Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
'msgbox("found")
rng.select
objWord.Selection.Paste
end if
next
objDoc.SaveAs path + "Templates\BS_TMP.docx"
'objDoc.Close
set objDoc=nothing
'objWord.quit
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.
Thanks