Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

Display text object content in headers(MS Word) using macro

I am using Macro to export the tables(in a word document).

Here is the macro

sub exportTable

on error resume next

set objWord = CreateObject("Word.Application")

objWord.visible = true

path = ActiveDocument.Evaluate("'$(QvWorkPath)\'")

'msgbox(path + "Templates\Trame BS.docx")

set objDoc=objWord.Documents.Open(path + "Templates\Sample.docx",true,false)

for i = 1 to 11

ActiveDocument.GetSheetObject("BC"& i ).CopyTableToClipboard (true)

Set rng = objDoc.Content

rng.Find.execute("<BS" & i & ">")

If rng.Find.Found = True Then




end if


objDoc.SaveAs path + "Templates\BS_TMP.docx"


set objDoc=nothing


set objWord=nothing

end sub

I need to display one text object content in Headers of all pages in Word document.

If anyone has written VB script for Headers, please share it.