Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One or two pages in Word 1

Status
Not open for further replies.

Mollethewizard

IS-IT--Management
Nov 18, 2002
93
SE
Just before leaving today’s work I’ve got this for me insoluble problem.
During the run of a macro the user enters text in a textbox which purpose is just entering optional text. The text entered sometimes is so lengthy that it runs over to a second page. In the further execution of the macro I’ve got to find out whether the document consists of one or two pages.

The code I would like

If (document is two pages) Then

do something with page two

End if

I just say – HELP!

Christer
 
Hi Christer,

Either of ..

Code:
ActiveDocument.BuiltInDocumentProperties(wdPropertyPages)

.. and ..

Code:
selection.Information(wdNumberOfPagesInDocument)

.. should help you out.

Enjoy,
Tony
 
You really are a pearl of the male species! A big star to you!

Thanks

Christer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top