Adding a Page Break in Word
Adding a Page Break in Word
(OP)
I'm scraping info and sending it to a Word doc. I want to be able to send data to Word and then at some point put in a page break and start a new page. It can be in the same doc, just different pages.
I use:
objDoc.Content.InsertAfter Chr$(13 ) & Chr$(10) & Chr$(13) & Chr$(10)
msgText = "Final transaction reviewed: "& TransId & "."
objDoc.Content.InsertAfter MsgText
to send data to the doc and a couple hard returns.
The cursor doesn't move during this process. I can continue to send info and it will put it at the bottom of last data. When I send a page break using: objDoc.Content.InsertBreak
it adds a new page but deletes everything before it. I'm thinking it's because it is doing break at cursor location and I don't know how to move the cursor. Any ideas??
I use:
objDoc.Content.InsertAfter Chr$(13 ) & Chr$(10) & Chr$(13) & Chr$(10)
msgText = "Final transaction reviewed: "& TransId & "."
objDoc.Content.InsertAfter MsgText
to send data to the doc and a couple hard returns.
The cursor doesn't move during this process. I can continue to send info and it will put it at the bottom of last data. When I send a page break using: objDoc.Content.InsertBreak
it adds a new page but deletes everything before it. I'm thinking it's because it is doing break at cursor location and I don't know how to move the cursor. Any ideas??
RE: Adding a Page Break in Word
See this FAQ:
FAQ99-4069
calculus
RE: Adding a Page Break in Word
RE: Adding a Page Break in Word
My staff does almost all their work on the mainframe so are in Extra 100% of the time. So I do like to have the button to fire the macro in Extra. I suppose I could use an Extra macro to open the spreadsheet and fire the macro?
RE: Adding a Page Break in Word
You can set up a button that will do certain things. I'd suggest, however, that you rethink your entire process. The user obviously wants a word document as the end result. Why not have them open a Word doc as step 1, then run a macro from there that conects to Extra, does stuff and outputst the doc?
In most of my cases, the user is blissfully unaware that Extra is churning in the background. They just see the "magic" happening in their Office Doc (ususally Excel).
calculus