Thread: [Solved] Get page number from object
View Single Post
 
Old 04-17-2018, 06:52 AM
catflap's Avatar
catflap catflap is offline Windows 7 64bit Office 2013
Advanced Beginner
 
Join Date: Aug 2015
Location: UK
Posts: 77
catflap is on a distinguished road
Default Get page number from object

Hi

I have a macro that loops through the text boxes in a multi-page word document and shrinks the text if it's overflowing:

Code:
For Each oShp In ActiveDocument.Shapes
      If oShp.Type = msoTextBox Then
            Do While ActiveDocument.Shapes(oShp.Name).TextFrame.Overflowing  
                  ActiveDocument.Shapes(oShp.Name).TextFrame.TextRange.Font.Shrink
            Loop
      End if
Next
Is there a nice little line I can out in here which I can use to tell the page number as the loop goes through? I have it in mind to display this on the statusbar so I get some indication of progress.

Thanks!
Reply With Quote