We use the following VB script to print Report sheets to Word doc. The problem is the pictures keeps anchoring further down (south of the Column break) on each page of the doc. We need to keep the picture consistently anchor at the same position on each page. Any ideas on how to do this?
The problem occurs on the following environment
Windows: 7
DIAdem: 11
MS Word: 2010
We believe that this problem does not occur using MS Word 2007.
for sheetNum = 1 to graphSheetCount ' Cycle through all sheets
PrintFromPage = sheetNum
PrinttoPage = sheetNum
Call GraphSheetNGet(sheetNum)
Call GraphSheetShow(GraphSheetName)
Call PicMaxPageCalc
For pageNum=1 to MaxYPage 'Printing all pages of the table
CurrYPage = pageNum
Dim myRange
Const wdPasteMetafilePicture = 3
'Insert a picture
'Call WdEasyTextCenter(Word,"") 'Insert CRLF before picture
Call PicPrint("WinClip") 'Copy graph device to clip board
Set myRange = word.ActiveDocument.Range(word.ActiveDocument.Range.End-1, word.ActiveDocument.Range.End)
myrange.PasteSpecial , , , ,wdPasteMetafilePicture
if pageNum <> MaxYPage then
call WdPageBreak(Word)
end if
next
if sheetNum <> graphSheetCount then
call WdPageBreak(Word)
end if
Next