Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2005

Tip: Looking for answers? Try searching our database.

On which page is textbox?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bart - 27 Jan 2005 14:30 GMT
Hi,

I'm using the following code to process textboxes in a document:

For Each Boxt In TDoc.Shapes
   With Boxt.TextFrame
       If .HasText Then
           ' Some processing
       End If
   End With
Next

Now I need the number of the page on which the current textbox
resides.
How do I determine that pagenumber?

TIA!

Bart
Jonathan West - 27 Jan 2005 14:48 GMT
> Hi,
>
[quoted text clipped - 11 lines]
> resides.
> How do I determine that pagenumber?

pagenum = TDoc.Anchor.Information(wdActiveEndPageNumber)

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

Bart - 27 Jan 2005 14:59 GMT
>TDoc.Anchor.Information(wdActiveEndPageNumber)

Thanks, Jonathan, but that results in an error 438 (... not supported
for this object).

BTW, I want to insert the pagenumber with the contents of the textbox
in an other document that is already open en that is the current
document.
Does that make any difference?

Bart
Jonathan West - 27 Jan 2005 15:02 GMT
>>TDoc.Anchor.Information(wdActiveEndPageNumber)
>
[quoted text clipped - 7 lines]
>
> Bart

Sorry, misread your For Each line. Should be this

BoxT.Anchor.Information(wdActiveEndPageNumber)

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

Bart - 27 Jan 2005 16:21 GMT
>BoxT.Anchor.Information(wdActiveEndPageNumber)

Thanks, Jonathan, you're a prince!

Bart
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.