<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=453222</guid>
        <pubDate>Wed, 08 Sep 2004 11:18:40 +0000</pubDate>
        <title>Замена слова в Ворде</title>
        <link>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=453222</link>
        <description><![CDATA[laifik: Запарилась я с этой проблемой. :wall:  Уже полностью воссоздала код макроса<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;If ActiveWindow.View.SplitSpecial &#60;&#62; wdPaneNone Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ActiveWindow.Panes(2).Close</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ActivePane.View.Type = wdOutlineView Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ActiveWindow.ActivePane.View.Type = wdPrintView</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader</div><div class="code_line">&nbsp;&nbsp; &nbsp;Selection.Find.ClearFormatting</div><div class="code_line">&nbsp;&nbsp; &nbsp;Selection.Find.Replacement.ClearFormatting</div><div class="code_line">&nbsp;&nbsp; &nbsp;With Selection.Find</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Text = &quot;Dez-nomer&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Replacement.Text = &quot;yyy&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Forward = True</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Wrap = wdFindContinue</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Format = False</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.MatchCase = False</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.MatchWholeWord = False</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.MatchWildcards = False</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.MatchSoundsLike = False</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.MatchAllWordForms = False</div><div class="code_line">&nbsp;&nbsp; &nbsp;End With</div><div class="code_line">&nbsp;&nbsp; &nbsp;Selection.Find.Execute Replace:=wdReplaceAll</div><div class="code_line">End Sub</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script> на языке Си:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">//Активизация колонтитула</div><div class="code_line">if(WordApp-&#62;ActiveWindow-&#62;View-&#62;SplitSpecial != wdPaneNone)</div><div class="code_line">{</div><div class="code_line">WordApp-&#62;ActiveWindow-&#62;Panes-&#62;Item(2)-&#62;Close();</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">if ((WordApp-&#62;ActiveWindow-&#62;ActivePane-&#62;View-&#62;Type == wdNormalView)</div><div class="code_line">&amp;&amp; (WordApp-&#62;ActiveWindow-&#62;ActivePane-&#62;View-&#62;Type == wdOutlineView))</div><div class="code_line">{</div><div class="code_line">WordApp-&#62;ActiveWindow-&#62;ActivePane-&#62;View-&#62;Type == wdPrintView;</div><div class="code_line">}</div><div class="code_line">WordApp-&#62;ActiveWindow-&#62;ActivePane-&#62;View-&#62;SeekView = wdSeekCurrentPageHeader;</div><div class="code_line">WordApp-&#62;ActiveWindow-&#62;ActivePane-&#62;View-&#62;NextHeaderFooter();</div><div class="code_line">&nbsp;</div><div class="code_line">if (WordApp-&#62;Selection-&#62;HeaderFooter-&#62;IsHeader == true)</div><div class="code_line">{</div><div class="code_line">WordApp-&#62;ActiveWindow-&#62;ActivePane-&#62;View-&#62;SeekView = wdSeekCurrentPageFooter;</div><div class="code_line">}</div><div class="code_line">else</div><div class="code_line">{</div><div class="code_line">WordApp-&#62;ActiveWindow-&#62;ActivePane-&#62;View-&#62;SeekView = wdSeekCurrentPageHeader;</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">WordApp-&#62;Selection-&#62;Find-&#62;ClearFormatting();</div><div class="code_line">WordApp-&#62;Selection-&#62;Find-&#62;Replacement-&#62;ClearFormatting();</div><div class="code_line">&nbsp;</div><div class="code_line">//Поиск и замена</div><div class="code_line">OleVariant oldStr,newStr;</div><div class="code_line">OleVariant EmptyPar=False;</div><div class="code_line">OleVariant Yes=True;</div><div class="code_line">oldStr=AnsiString(&quot;Dez-nomer&quot;);</div><div class="code_line">newStr=AnsiString(&quot;xxx&quot;);</div><div class="code_line">OleVariant Replace = wdReplaceAll;</div><div class="code_line">&nbsp;</div><div class="code_line">WordApp-&#62;ActiveDocument-&#62;Range(EmptyParam,EmptyParam)-&#62;Find-&#62;Execute(oldStr,</div><div class="code_line">&nbsp;EmptyParam,EmptyParam,EmptyParam,EmptyParam,</div><div class="code_line">&nbsp;EmptyParam,EmptyParam,EmptyParam,EmptyParam,</div><div class="code_line">&nbsp;newStr,Yes); </div></ol></div></div></div></div><br>
Самое интересное, что ни этот код, ни макрос в колонтитуле не работают.<br>
Я использую вордовский шаблон, где в колонтитул вставлена таблица. В одной из ее ячеек стоит &quot;Dez-nomer&quot;, который нужно поменять. При активизации колонтитула данные в ячейках странно себя ведут: то они активны, то они приглушены (на языке С++ это Enabled = false). Но в том, и другом случае поиск и замена отсутствуют. Несколько раз макрос отрабатывался, но по большей части он игнорирует фразу по запросу поиска. Я бы не суетилась, если бы макрос постоянно не работал, но почему через раз... Тогда мне не понятно, как добраться до данных в таблице, которая находится в колонтитуле.<br>
И еще важный момент: когда я открываю колонтитул на двойной щелчок (без участия макроса), а затем запускаю макрос на поиск фразы и ее замену, то макрос работает. Дело, наверное, в самом шаблоне, но его делали несколько лет назад. Ворд я знаю неплохо, но не могу разобраться, в чем причина. И стили проверила, и все свойства. <br>
Может кто-нибудь знает ответ на мой вопрос?<br>
И еще: если эти два куска (активизация колонтитула и поиск фразы) исполнять по отдельности, то они работают как надо. Только поиск фразы осуществляется по всему документу, не затрагивая колонтитул.]]></description>
        <author>laifik</author>
        <category>Borland C++ Builder/Turbo C++ Explorer</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=452590</guid>
        <pubDate>Tue, 07 Sep 2004 15:49:41 +0000</pubDate>
        <title>Замена слова в Ворде</title>
        <link>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=452590</link>
        <description><![CDATA[Guest: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>SmK,7.09.04, 16:21</span><div class='quote '>А почему нельзя сделать Dll на Бейсике и уже его использовать в C ? <br>
Или я чего то непонимаю или так гораздо проще, если код на Бейсике уже есть.</div></div><br>
Это уже высший пилотаж. Я не умею это делать. Зато Ворд из Билдера загружаю со многими возможностями. И мне даже интересно довести это до конца.<br>
Далее я еще хочу осуществить формирование оглавления на основе заголовков со стилями.<br>
А что касается использования VBA, то можно прикрепить макрос, но хочется обойтись без него.]]></description>
        <author>Guest</author>
        <category>Borland C++ Builder/Turbo C++ Explorer</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=452514</guid>
        <pubDate>Tue, 07 Sep 2004 14:17:49 +0000</pubDate>
        <title>Замена слова в Ворде</title>
        <link>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=452514</link>
        <description><![CDATA[Bas: Попробуйте примерно так<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">WDoc-&#62;Sections-&#62;Item(1)-&#62;get_Range()-&#62;Find-&#62;Execute(...</div><div class="code_line">||</div><div class="code_line">WDoc-&#62;Sections-&#62;Item(1)-&#62;Headers-&#62;Item(wdHeaderFooterFirstPage)-&#62;Range-&#62;Find</div><div class="code_line">||</div><div class="code_line">WDoc-&#62;Sections-&#62;Item(wdHeaderFooterType)-&#62;Headers-&#62;Item</div><div class="code_line">(wdHeaderFooterFirstPage)-&#62;Range-&#62;Find</div></ol></div></div></div></div>]]></description>
        <author>Bas</author>
        <category>Borland C++ Builder/Turbo C++ Explorer</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=452470</guid>
        <pubDate>Tue, 07 Sep 2004 13:21:59 +0000</pubDate>
        <title>Замена слова в Ворде</title>
        <link>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=452470</link>
        <description><![CDATA[SmK: А почему нельзя сделать Dll на Бейсике и уже его использовать в C ? <br>Или я чего то непонимаю или так гораздо проще, если код на Бейсике уже есть.]]></description>
        <author>SmK</author>
        <category>Borland C++ Builder/Turbo C++ Explorer</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=452421</guid>
        <pubDate>Tue, 07 Sep 2004 12:31:41 +0000</pubDate>
        <title>Замена слова в Ворде</title>
        <link>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=452421</link>
        <description><![CDATA[laifik: В общем, на Бейсике активизация колонтитула и замена строки в макросе выглядит так:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">//Найти в колонтитуле и изменить</div><div class="code_line">&nbsp;&nbsp;Selection.Find.ClearFormatting</div><div class="code_line">&nbsp;&nbsp; &nbsp;Selection.Find.Replacement.ClearFormatting</div><div class="code_line">&nbsp;&nbsp; &nbsp;With Selection.Find</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Text = &quot;Dez_nomer&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Replacement.Text = &quot;rr&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Forward = True</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Wrap = wdFindContinue</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Format = False</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.MatchCase = False</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.MatchWholeWord = False</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.MatchWildcards = False</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.MatchSoundsLike = False</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.MatchAllWordForms = False</div><div class="code_line">&nbsp;&nbsp; &nbsp;End With</div><div class="code_line">&nbsp;&nbsp; &nbsp;Selection.Find.Execute Replace:=wdReplaceAll</div><div class="code_line">End Sub</div></ol></div></div></div></div><br>
<br>
С огромным трудом, но удалось перевести на Си.<br>
Получилось вот что:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">//Активизация колонтитула</div><div class="code_line">WordApp-&#62;ActiveWindow-&#62;ActivePane-&#62;View-&#62;SeekView = wdSeekCurrentPageHeader;</div><div class="code_line">&nbsp;</div><div class="code_line">WordApp-&#62;ActiveDocument-&#62;Range(EmptyParam,EmptyParam)-&#62;Find-&#62;ClearFormatting();</div><div class="code_line">WordApp-&#62;ActiveDocument-&#62;Range(EmptyParam,EmptyParam)-&#62;Find-&#62;Replacement-&#62;ClearFormatting();</div><div class="code_line">//Замена слова</div><div class="code_line">OleVariant oldStr,newStr;</div><div class="code_line">OleVariant EmptyPar=False;</div><div class="code_line">OleVariant Yes=True;</div><div class="code_line">oldStr=AnsiString(&quot;Dez_nomer&quot;);</div><div class="code_line">newStr=AnsiString(&quot;xxx&quot;);</div><div class="code_line">WordApp-&#62;ActiveDocument-&#62;Range(EmptyParam,EmptyParam)-&#62;Find-&#62;Execute(oldStr,</div><div class="code_line">&nbsp;EmptyParam,EmptyParam,EmptyParam,EmptyParam,</div><div class="code_line">&nbsp;EmptyParam,EmptyParam,EmptyParam,EmptyParam,</div><div class="code_line">&nbsp;newStr,Yes);</div></ol></div></div></div></div><br>
Вроде все правильно, но происходит активизация колонтитула, а замена слова почему-то нет. Если повнимательнее присмотреться к первому коду, посоветуйте, чего мне не хватает во втором?]]></description>
        <author>laifik</author>
        <category>Borland C++ Builder/Turbo C++ Explorer</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=452162</guid>
        <pubDate>Tue, 07 Sep 2004 08:05:45 +0000</pubDate>
        <title>Замена слова в Ворде</title>
        <link>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=452162</link>
        <description><![CDATA[laifik: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>laifik,7.09.04, 07:42</span><div class='quote '><div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">OleVariant tr = AnsiString(&quot;true&quot;);</div></ol></div></div></div></div></div></div><br>
Bas, вот в этой фразе я сморозила глупость. Обратила внимание, когда увидела Ваш код. Спасибо большое.<br>
Но на этом вопрос не закончился.<br>
А если текст &quot;Текст номера&quot; находится в колонтитуле. То как активизировать колонтитул на языке Си и заменить в нем фразу? Опять же, на Бейсике все понятно.]]></description>
        <author>laifik</author>
        <category>Borland C++ Builder/Turbo C++ Explorer</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=452136</guid>
        <pubDate>Tue, 07 Sep 2004 07:50:31 +0000</pubDate>
        <title>Замена слова в Ворде</title>
        <link>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=452136</link>
        <description><![CDATA[Bas: <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">OleVariant oldStr,newStr;</div><div class="code_line">OleVariant EmptyPar=False;</div><div class="code_line">OleVariant Yes=True;</div><div class="code_line">oldStr=AnsiString(&quot;@3&quot;);</div><div class="code_line">newStr=AnsiString(MaskEdit1-&#62;Text);</div><div class="code_line">&nbsp;WApp-&#62;ActiveDocument-&#62;Range(EmptyParam,EmptyParam)-&#62;Find-&#62;Execute(oldStr,</div><div class="code_line">&nbsp;EmptyParam,EmptyParam,EmptyParam,EmptyParam,</div><div class="code_line">&nbsp;EmptyParam,EmptyParam,EmptyParam,EmptyParam,</div><div class="code_line">&nbsp;newStr,Yes);</div></ol></div></div></div></div> <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='8' style='font-size:8pt;'><strong class='tag-b'>Добавлено в <time class="tag-mergetime" datetime="2004-09-07T07:52:14+00:00">07.09.04, 07:52</time></strong>:</span></span><br>
<a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=51366&unread=1&hl=' target='_blank'>Работаем с Word, COM</a>]]></description>
        <author>Bas</author>
        <category>Borland C++ Builder/Turbo C++ Explorer</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=452133</guid>
        <pubDate>Tue, 07 Sep 2004 07:46:05 +0000</pubDate>
        <title>Замена слова в Ворде</title>
        <link>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=452133</link>
        <description><![CDATA[Song: хе :)<br>на бейсике это так потому что это родной вордовский &quot;объект&quot;. :)<br>В си тебе придётся создавать OLE объекты, подключаться к ворду и там уже исполнять VBA макросы.]]></description>
        <author>Song</author>
        <category>Borland C++ Builder/Turbo C++ Explorer</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=452128</guid>
        <pubDate>Tue, 07 Sep 2004 07:42:58 +0000</pubDate>
        <title>Замена слова в Ворде</title>
        <link>https://forum.sources.ru/index.php?showtopic=65244&amp;view=findpost&amp;p=452128</link>
        <description><![CDATA[laifik: Извините, что-то у меня сегодня много вопросов. Более месяца их не возникало...<br>
На Бейсике это так:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;Selection.Find.Execute</div><div class="code_line">&nbsp;&nbsp; &nbsp;With Selection.Find</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Text = &quot;Текст номера&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Replacement.Text = &quot;1052-426-003&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Forward = True</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Wrap = wdFindContinue</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Format = False</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.MatchCase = False</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.MatchWholeWord = False</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.MatchWildcards = False</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.MatchSoundsLike = False</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.MatchAllWordForms = False</div><div class="code_line">&nbsp;&nbsp; &nbsp;End With</div><div class="code_line">&nbsp;&nbsp; &nbsp;With Selection</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;If .Find.Forward = True Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.Collapse Direction:=wdCollapseStart</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.Collapse Direction:=wdCollapseEnd</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Find.Execute Replace:=wdReplaceOne</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;If .Find.Forward = True Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.Collapse Direction:=wdCollapseEnd</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.Collapse Direction:=wdCollapseStart</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;.Find.Execute</div><div class="code_line">&nbsp;&nbsp; &nbsp;End With</div><div class="code_line">End Sub</div></ol></div></div></div></div><br>
Пробую перевести на язык Си, ничего не получается.<br>
Прошу учесть, что Ворд у меня уже открыт, документ создан, нужно найти только фразу &quot;Текст номера&quot; и заменить ее на &quot;1052-426-003&quot;.<br>
Читала справку Ворда, там приблизительно так же. Зато в самом Билдере после <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">WordApp-&#62;Selection</div></ol></div></div></div></div> Find в структуре не числится. Есть только get_Find, но опять же не получается его прикрепить.<br>
На форуме нашла<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">OleVariant oldStr=AnsiString(&quot;Текст номера&quot;);</div><div class="code_line">OleVariant newStr=AnsiString(&quot;1052-426-003&quot;);</div><div class="code_line">OleVariant tr = AnsiString(&quot;true&quot;);</div><div class="code_line">WordApp-&#62;ActiveDocument-&#62;Range(EmptyParam,EmptyParam)-&#62;Find-&#62;Execute(oldStr,</div><div class="code_line">EmptyParam,EmptyParam,EmptyParam,EmptyParam,</div><div class="code_line">EmptyParam,EmptyParam,EmptyParam,EmptyParam,</div><div class="code_line">newStr,tr);</div></ol></div></div></div></div><br>
но задача не выполняется, работа Ворда прерывается. Подскажите работающий код, пожалуйста&#33; :(]]></description>
        <author>laifik</author>
        <category>Borland C++ Builder/Turbo C++ Explorer</category>
      </item>
	
      </channel>
      </rss>
	