<?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 Re: Replace a String in Word with a Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Replace-a-String-in-Word-with-a-Macro/m-p/329461#M121266</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot, and&amp;nbsp; sorry about the delay...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jun 2012 08:12:50 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-06-12T08:12:50Z</dc:date>
    <item>
      <title>Replace a String in Word with a Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-a-String-in-Word-with-a-Macro/m-p/329459#M121264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anybody know the way to replace a string (Let`s say: %Amount%) in a Word File using the vbscript?&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2012 14:07:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-a-String-in-Word-with-a-Macro/m-p/329459#M121264</guid>
      <dc:creator />
      <dc:date>2012-05-30T14:07:55Z</dc:date>
    </item>
    <item>
      <title>Replace a String in Word with a Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-a-String-in-Word-with-a-Macro/m-p/329460#M121265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pedro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this, courtesy of Microsoft ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub openDoc&lt;/P&gt;&lt;P&gt; Const wdReplaceAll&amp;nbsp; = 2&lt;/P&gt;&lt;P&gt; Set objWord = CreateObject("Word.Application")&lt;BR /&gt; objWord.Visible = True&lt;BR /&gt; Set objFile1 = objWord.Documents.Open("...&amp;nbsp; your file path here ...")&lt;/P&gt;&lt;P&gt; Set objSelection = objWord.Selection&lt;/P&gt;&lt;P&gt; objSelection.Find.Text = "%Amount%"&lt;BR /&gt; objSelection.Find.Forward = TRUE&lt;BR /&gt; objSelection.Find.MatchWholeWord = TRUE&lt;/P&gt;&lt;P&gt; objSelection.Find.Replacement.Text = "Qlikview"&lt;BR /&gt; objSelection.Find.Execute ,,,,,,,,,,wdReplaceAll&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the commas in the last line of code are correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;flipside&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2012 21:35:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-a-String-in-Word-with-a-Macro/m-p/329460#M121265</guid>
      <dc:creator>flipside</dc:creator>
      <dc:date>2012-05-30T21:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Replace a String in Word with a Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-a-String-in-Word-with-a-Macro/m-p/329461#M121266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot, and&amp;nbsp; sorry about the delay...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2012 08:12:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-a-String-in-Word-with-a-Macro/m-p/329461#M121266</guid>
      <dc:creator />
      <dc:date>2012-06-12T08:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Replace a String in Word with a Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-a-String-in-Word-with-a-Macro/m-p/329462#M121267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pedro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can we do something similar for microsoft excel&amp;nbsp; after creating "Excel.Application" object in an activesheet ?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Puneet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 00:21:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-a-String-in-Word-with-a-Macro/m-p/329462#M121267</guid>
      <dc:creator />
      <dc:date>2013-01-24T00:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Replace a String in Word with a Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-a-String-in-Word-with-a-Macro/m-p/329463#M121268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13590129441119211" jivemacro_uid="_13590129441119211"&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: arial, helvetica, sans-serif;"&gt;Set xlApp = CreateObject("Excel.Application")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: arial, helvetica, sans-serif;"&gt; xlApp.Visible = True&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: arial, helvetica, sans-serif;"&gt;Set xlSheet = xlApp.ActiveSheet&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: arial, helvetica, sans-serif;"&gt;'*********************************************************&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: arial, helvetica, sans-serif;"&gt;xlSheet.Cells.Replace "TextToFind", "TextToReplace"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 07:35:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-a-String-in-Word-with-a-Macro/m-p/329463#M121268</guid>
      <dc:creator />
      <dc:date>2013-01-24T07:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Replace a String in Word with a Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-a-String-in-Word-with-a-Macro/m-p/329464#M121269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pedro, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response. This worked perfectly !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the syntax of &lt;CODE class="jive-code"&gt;xlSheet.Cells.Replace "TextToFind", "TextToReplace"&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there a parameter which can help me replace full cell contents if even &lt;SPAN style="font-family: monospace;"&gt;TextToFind&lt;/SPAN&gt; is a part of the content of a cell ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example - My Cell contains "&lt;SPAN style="font-family: monospace;"&gt;TextToFind&lt;/SPAN&gt; ABC" and I want to replace the full cell contents with &lt;SPAN style="font-family: monospace;"&gt;"TextToReplace"&lt;/SPAN&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 07:40:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-a-String-in-Word-with-a-Macro/m-p/329464#M121269</guid>
      <dc:creator />
      <dc:date>2013-01-24T07:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Replace a String in Word with a Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-a-String-in-Word-with-a-Macro/m-p/329465#M121270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this, I've tested it and it worked for me. It's a modification of the Excel Online Help&amp;nbsp; example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13590186298351531" jivemacro_uid="_13590186298351531"&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 8pt;"&gt; Set objCells=xlSheet.Cells&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 8pt;"&gt;With objCells&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; Set c = .Find ("TextoToFind")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not c Is Nothing Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; firstAddress = c.Address&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.Value = "TextToReplace"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set c = .FindNext(c)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Loop While Not c Is Nothing And c.Address &amp;lt;&amp;gt; firstAddress&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 8pt;"&gt;End With&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt; Hope It works for you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 09:10:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-a-String-in-Word-with-a-Macro/m-p/329465#M121270</guid>
      <dc:creator />
      <dc:date>2013-01-24T09:10:22Z</dc:date>
    </item>
  </channel>
</rss>

