Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sivarajs
Specialist II
Specialist II

horizontal view changes after exporting to word

Hi,

I have a straight table which am showing as horizontal view. I am exporting the table to word document. After exporting to word the view changes to vertical. How to fix this?

Code:

Sub export_word

set objWord = CreateObject("Word.Application")

objWord.visible = false

set objDoc=objWord.Documents.add

Const wdOrientLandscape = 0

objDoc.PageSetup.Orientation = wdOrientLandscape

ActiveDocument.GetSheetObject("CH02").CopyTableToClipboard true

objWord.Selection.Paste

objSelection.TypeText chr(11)

ActiveDocument.GetSheetObject("CH04").CopyTableToClipboard true

objWord.Selection.Paste

objSelection.TypeText chr(11)

ActiveDocument.GetSheetObject("CH01").CopyTableToClipboard true

objWord.Selection.Paste

'objDoc.SaveAs "C:\Report"

objWord.quit

end sub

Regards,

Sivaraj

0 Replies