DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Export report plots to word document at specific pages

Solved!
Go to solution
Highlighted

I have a report with multiple sheets; each sheet has one plot. I would like to export each plot of these into different specific sections (or pages) of a Word document; for example plotA to page 2, plotB to page 4, etc.

I have had a look into the Wrd_OLE.vbs of Diadem example. The script uses bookmarks to export plots. However my document does not have any bookmark. Therefore I have to export basing on specific page numbers. 

Please provide me suggestion how to access to page. 

Thank you.

0 Kudos
Message 1 of 2
(556 Views)
Solution
Accepted by topic author levan8421
08-17-2017 07:19 AM

I have figured out the solution:

  Const wdGoToPage = &H1
  Const wdGoToAbsolute = &H1
  Const wdGoToLine = &H3
  Const wdGoToRelative = &H2    

Call oWord.Selection.GoTo(wdGoToPage, wdGoToAbsolute, PageNumber) 'Jump to page
Call oWord.Selection.GoTo(wdGoToLine, wdGoToRelative, NumofLines) 'Move forward number of lines
Call oWord.Selection.PasteSpecial( , , wdInLine, , wdPasteMetafilePicture)
Message 2 of 2
(501 Views)