<?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: How to display text object content in Header(MS Word) using Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257716#M869142</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Anil. I am ajay. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on a report.&amp;nbsp; I change the object id in pivot table and I use a loop to display the table in the word. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;In the word document, I have to display the year selected and region inside the Headers. &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;The tag for year is &amp;lt;BDU_2&amp;gt; and for region is &amp;lt;BDU_3&amp;gt;.&amp;nbsp; When i click the button in App, macro will generate word doc. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I used headers in Word to display year and region name. With the above macro, Its not working for header section. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;IMG alt="word.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/145439_word.png" style="height: 439px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Dec 2016 13:29:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-12-01T13:29:39Z</dc:date>
    <item>
      <title>How to display text object content in Header(MS Word) using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257709#M869135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using Macro to export the tables(in a word document). &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Here is the macro&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sub exportTable&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;on error resume next&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG style="font-size: 10pt;"&gt;set objWord = CreateObject("Word.Application") &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;objWord.visible = true&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;path = ActiveDocument.Evaluate("'$(QvWorkPath)\'")&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;'msgbox(path + "Templates\Trame BS.docx")&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;set objDoc=objWord.Documents.Open(path + "Templates\Sample.docx",true,false)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 120px;"&gt;&lt;STRONG&gt;for i = 1 to 11&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 150px;"&gt;&lt;STRONG&gt;ActiveDocument.GetSheetObject("BC"&amp;amp; i ).CopyTableToClipboard (true)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 150px;"&gt;&lt;STRONG&gt; Set rng = objDoc.Content &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 150px;"&gt;&lt;STRONG&gt;rng.Find.execute("&amp;lt;BS" &amp;amp; i &amp;amp; "&amp;gt;")&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 150px;"&gt;&lt;STRONG&gt;If rng.Find.Found = True Then &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 150px;"&gt;&lt;STRONG&gt;&amp;nbsp; 'msgbox("found") &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 150px;"&gt;&lt;STRONG&gt;&amp;nbsp; rng.select&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 150px;"&gt;&lt;STRONG&gt;&amp;nbsp; objWord.Selection.Paste&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 120px;"&gt;&lt;STRONG style="font-size: 10pt;"&gt;end if&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 120px;"&gt;&lt;STRONG&gt;next&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;objDoc.SaveAs path + "Templates\BS_TMP.docx"&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;'objDoc.Close&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;set objDoc=nothing&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;'objWord.quit&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;set objWord=nothing&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;end sub&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to display one text object content in Headers of all pages in Word document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone has written VB script for Headers, please share it. &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257709#M869135</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to display text object content in Header(MS Word) using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257710#M869136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;sub exportTable&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;on error resume next&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 60px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 60px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;set objWord = CreateObject("Word.Application")&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 60px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;objWord.visible = true&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 60px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;path = ActiveDocument.Evaluate("'$(QvWorkPath)\'")&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 60px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;'msgbox(path + "Templates\Trame BS.docx")&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 60px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;set objDoc=objWord.Documents.Open(path + "Templates\Sample.docx",true,false)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 120px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;for i = 1 to 11&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 150px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;ActiveDocument.GetSheetObject("BC"&amp;amp; i ).Copy&lt;SPAN style="text-decoration: line-through;"&gt;Table&lt;/SPAN&gt;&lt;STRONG style="color: #ff0000; font-style: inherit; font-family: inherit;"&gt;Text&lt;/STRONG&gt;ToClipboard (true)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 150px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Set rng = objDoc.Content&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 150px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;rng.Find.execute("&amp;lt;BS" &amp;amp; i &amp;amp; "&amp;gt;")&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 150px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;If rng.Find.Found = True Then&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 150px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; 'msgbox("found")&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 150px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; rng.select&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 150px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; objWord.Selection.Paste&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 120px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;end if&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 120px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;next&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;objDoc.SaveAs path + "Templates\BS_TMP.docx"&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;'objDoc.Close&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;set objDoc=nothing&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;'objWord.quit&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding: 0 0 0 30px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;set objWord=nothing&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;end sub&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2016 02:54:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257710#M869136</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-12-01T02:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to display text object content in Header(MS Word) using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257711#M869137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply.&amp;nbsp; I have tried CopyTextToClipboard. I got content of the text object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to use it in Headers(VB script) in Word?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2016 07:13:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257711#M869137</guid>
      <dc:creator />
      <dc:date>2016-12-01T07:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to display text object content in Header(MS Word) using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257712#M869138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, Good to hear. Now check this to get headers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Const ForReading = 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Const ForWriting = 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt;"&gt;Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set objFile = objFSO.OpenTextFile("DriveReport.txt", ForReading)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;strContents = objFile.ReadAll&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;objFile.Close&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;strFirstLine = "Server" &amp;amp; vbTab &amp;amp; vbtab &amp;amp; "Drive" &amp;amp; vbtab &amp;amp; "Size" &amp;amp; vbtab &amp;amp; "Used" &amp;amp; vbtab &amp;amp; "Free" &amp;amp; vbtab &amp;amp; "Free(%)"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;strNewContents = strFirstLine &amp;amp; vbCrLf &amp;amp; strContents&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set objFile = objFSO.OpenTextFile("DriveReport.txt", ForWriting)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;objFile.WriteLine strNewContents&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;objFile.Close&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then club for text and headers then see, How seems work and let us know. We may can help you for final script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2016 07:25:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257712#M869138</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-12-01T07:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to display text object content in Header(MS Word) using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257713#M869139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't worry about VBTAB (It's act as Chr(9) in Qlikview)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2016 07:26:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257713#M869139</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-12-01T07:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to display text object content in Header(MS Word) using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257714#M869140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rahul. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a image for your reference(you can see two text objects ID in the header)&lt;IMG alt="textobject.png" class="jive-image image-1" height="177" src="https://community.qlik.com/legacyfs/online/145406_textobject.png" style="height: 177px; width: 314.067px;" width="314" /&gt;&lt;IMG alt="header.png" class="jive-image image-2" height="163" src="https://community.qlik.com/legacyfs/online/145407_header.png" style="height: 163px; width: 289.647px;" width="290" /&gt;&lt;/P&gt;&lt;P&gt;This is the script to paste text object content in Word.&amp;nbsp; I want to paste it in Headers (every page) of Word Document&lt;/P&gt;&lt;P&gt; for i = 1 to 20&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.GetSheetObject("BDU_"&amp;amp; 2).CopyTextToClipboard 'true&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set rng = objDoc.Content &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rng.Find.execute("&amp;lt;BDU_" &amp;amp; 2 &amp;amp; "&amp;gt;")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If rng.Find.Found = True Then &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'msgbox("found") &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rng.select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objWord.Selection.Paste&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;&lt;P&gt;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For reference : &lt;A href="https://msdn.microsoft.com/en-us/library/office/ff194465.aspx" title="https://msdn.microsoft.com/en-us/library/office/ff194465.aspx"&gt;HeadersFooters Object (Word)&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2016 08:47:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257714#M869140</guid>
      <dc:creator />
      <dc:date>2016-12-01T08:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to display text object content in Header(MS Word) using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257715#M869141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you done with these 2 objects? Can you elaborate more. Would you get a chance to send that content to Word. If so, What was the next forward. Would you describe more your intend to show headers as well&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW - I am the Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2016 10:47:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257715#M869141</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-12-01T10:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to display text object content in Header(MS Word) using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257716#M869142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Anil. I am ajay. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on a report.&amp;nbsp; I change the object id in pivot table and I use a loop to display the table in the word. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;In the word document, I have to display the year selected and region inside the Headers. &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;The tag for year is &amp;lt;BDU_2&amp;gt; and for region is &amp;lt;BDU_3&amp;gt;.&amp;nbsp; When i click the button in App, macro will generate word doc. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I used headers in Word to display year and region name. With the above macro, Its not working for header section. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;IMG alt="word.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/145439_word.png" style="height: 439px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2016 13:29:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-display-text-object-content-in-Header-MS-Word-using-Macro/m-p/1257716#M869142</guid>
      <dc:creator />
      <dc:date>2016-12-01T13:29:39Z</dc:date>
    </item>
  </channel>
</rss>

