<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Search method I_OI_WORD_PROCESSOR_DOCUMENT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-method-i-oi-word-processor-document/m-p/12790661#M2024286</link>
    <description>&lt;P&gt;The "pos" parameter of the search and replace method does not specify the values it should take for each of the options. According to the documentation, the options are "global", "up", and "down."&lt;BR /&gt;&lt;BR /&gt; call method wp_wordpro-&amp;gt;replace&lt;/P&gt;
  &lt;P&gt; exporting &lt;BR /&gt; flag = 'X' &lt;BR /&gt; pos = ¿Value for the 'global' option.? &lt;BR /&gt; replace_string = p_valor &lt;BR /&gt; search_string = p_search_string &lt;BR /&gt; importing &lt;BR /&gt; error = l_error &lt;BR /&gt; retcode = l_retcode. &lt;/P&gt;
  &lt;P&gt;Based on the cursor position, it is unable to replace the text.&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Dec 2023 11:08:22 GMT</pubDate>
    <dc:creator>bmartini34</dc:creator>
    <dc:date>2023-12-15T11:08:22Z</dc:date>
    <item>
      <title>Search method I_OI_WORD_PROCESSOR_DOCUMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-method-i-oi-word-processor-document/m-p/12790661#M2024286</link>
      <description>&lt;P&gt;The "pos" parameter of the search and replace method does not specify the values it should take for each of the options. According to the documentation, the options are "global", "up", and "down."&lt;BR /&gt;&lt;BR /&gt; call method wp_wordpro-&amp;gt;replace&lt;/P&gt;
  &lt;P&gt; exporting &lt;BR /&gt; flag = 'X' &lt;BR /&gt; pos = ¿Value for the 'global' option.? &lt;BR /&gt; replace_string = p_valor &lt;BR /&gt; search_string = p_search_string &lt;BR /&gt; importing &lt;BR /&gt; error = l_error &lt;BR /&gt; retcode = l_retcode. &lt;/P&gt;
  &lt;P&gt;Based on the cursor position, it is unable to replace the text.&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 11:08:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-method-i-oi-word-processor-document/m-p/12790661#M2024286</guid>
      <dc:creator>bmartini34</dc:creator>
      <dc:date>2023-12-15T11:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Search method I_OI_WORD_PROCESSOR_DOCUMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-method-i-oi-word-processor-document/m-p/12790662#M2024287</link>
      <description>&lt;P&gt;The "values it should take for each of the options [...] are  "global", "up", and "down."&lt;/P&gt;&lt;P&gt;Correct, what is your question?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 12:16:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-method-i-oi-word-processor-document/m-p/12790662#M2024287</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-12-15T12:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Search method I_OI_WORD_PROCESSOR_DOCUMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-method-i-oi-word-processor-document/m-p/12790663#M2024288</link>
      <description>&lt;P&gt;Please use the COMMENT button for comments, asking for complements, adding details, replying to a comment or a proposed solution or to the OP question, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area.&lt;/P&gt;&lt;P&gt;Better use Actions &amp;gt; Edit to indicate your question "how to reposition the cursor at the beginning of the document"&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 12:40:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-method-i-oi-word-processor-document/m-p/12790663#M2024288</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-12-15T12:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Search method I_OI_WORD_PROCESSOR_DOCUMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-method-i-oi-word-processor-document/m-p/12790664#M2024289</link>
      <description>&lt;P&gt;if any of the indicated options are used, the replace method does not work. My question is whether the value 'global' equals 0, 'up' equals 1, or something similar.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 12:45:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-method-i-oi-word-processor-document/m-p/12790664#M2024289</guid>
      <dc:creator>bmartini34</dc:creator>
      <dc:date>2023-12-15T12:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Search method I_OI_WORD_PROCESSOR_DOCUMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-method-i-oi-word-processor-document/m-p/12790665#M2024290</link>
      <description>&lt;P&gt;Reposition the cursor at the beginning of the document before each search or replace to make sure.&lt;/P&gt;&lt;P&gt;You may directly access OLE and execute OLE Word methods to reposition the cursor before the texts to search and replace (e.g. at the top) = equivalent to VBA code "Call Selection.HomeKey(Unit:=wdStory)":&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA doi_control TYPE REF TO I_OI_CONTAINER_CONTROL.

c_oi_container_control_creator=&amp;gt;get_container_control(
    IMPORTING
      control = doi_control ).

... " MS Word initialization

" direct OLE Call of "Selection.HomeKey(Unit:=wdStory)"
DATA(doi_handle) = doi_control-&amp;gt;get_control_handle( ). " type CNTL_HANDLE in type pool CNTL
DATA(ole_handle) = doi_handle-obj. " type OBJ_RECORD
GET PROPERTY OF ole_handle 'Selection' = selection.&lt;BR /&gt;CALL METHOD OF selection 'HomeKey' EXPORTING #1 = 6. " Constant wdStory = 6

... " Search or Replace&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The code is incomplete, you can find what is missing in the forum.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 13:08:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-method-i-oi-word-processor-document/m-p/12790665#M2024290</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-12-15T13:08:49Z</dc:date>
    </item>
  </channel>
</rss>

