This content has been marked as final. Show 3 replies
set myPage = myWord.ParentTextFrames.Item(1).Parent
of course this will be true if your TextFrame is located on Page - it's not InLine or part of group or lie on Spread
Thank you. I have tried it. Sounds Good. But I don't understand why Item(1) are set.
Set myPage =myWord.ParentTextFrames.Item(1).Parent
PageNo = myWord.Documentoffset
There is another Question that why Story.TextFrames.Count alway is 0, Is it bug?
> But I don't understand why Item(1) are set.
because Word can have more than one parent TextFrame - when split across TextFrames
only Character have one ParentTextFrame accessed also by ParentTextFrames.Item(1)
> why Story.TextFrames.Count alway is 0, Is it bug?
no - it's not bug
in older IDs - Story.TextFrames collection refer to all TextFrames as containers for Story text
but in CS3 - collection Story.TextFrames contain all TextFrames inserted as InLine/Anchored objects - same like Story.Rectangles or Story.Ovals
in CS3 - when you want to refer to TextFrames as containers for Story text - you need to use Story.TextContainers - because now you can link TextFrame and Text-On-Path as Story - Text-On-Path isn't TextFrame