-
Solved: Counting number of pages in word
Hi all
I have a project that builds a 2 column table on a word document from an excel spreadsheet adding images and some text to each row of the table.
It builds the table by looping through a list on a spreadsheet
The majority of the time all the info fits onto one page of the word doc, however sometimes it will spill over onto 2 pages
Is there a way that during the loop routine it can identify when the word document will start a new page????
-
You would probably have more luck asking this in a Word forum.
Have you thought about using Word's FitToPages?
I don't do Word much but if the Word object names is wa then:
[vba]MsgBox wa.ActiveDocument.ActiveWindow.ActivePane.Pages.Count[/vba]
-
Thanks
Thanks Kenneth
Thats worked great and has solved the problem I asked.
But has given me another problem with headers and form fields which I will post in a new thread
Thanks again
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules