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 / Long Documents / August 2004

Tip: Looking for answers? Try searching our database.

Page numbering after TOC

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roger Knowles - 09 Aug 2004 22:24 GMT
Thanks Robert for previous assistance the Template I'm working on is nearing
completion....

Here's another problem if anyone can help....

I have a Macro that Inserts TOC.
A Page Break Before - This might become a new Page Section break
Then the TOC
Then a New Page Section Break.

In the Section following the TOC I want to alter the style for the Footer.

TOC has              Docname                          CreateDate
Section following  docName   Page X of Y    Create Date

I cannot seem to get the macro to navigate me to the section after I have
turned off Same as Previous, it jumps back to the TOC section and alters
that one.  I thaught of using a Bookmark, and Goto, these are not being
picked up in the Head/Foot..

Any help/ideas as always appriciated.

Roger Knowles
MOS 97, 2000, 2002 Master
Jezebel - 09 Aug 2004 23:28 GMT
It's a little hard to advise since you haven't posted your code, but this
sort of macro problem usually arises if you try to 'navigate' in your macro
code using the selection object and the sort of navigation you do when
editing footers manually.

Assuming your document ends up with two sections, try something like

Dim pRange As Word.Range
With ActiveDocument.Sections(2).Footers(wdHeaderFooterPrimary)
   .LinkToPrevious = False
   .Range = ""
   .Range.Fields.Add Range:=.Range, Type:=wdFieldFileName
   .Range.InsertAfter vbTab & "Page "

   Set pRange = .Range
   pRange.Collapse Direction:=wdCollapseEnd
   .Range.Fields.Add Range:=pRange, Type:=wdFieldPage

   [.... etc .... ]
End With

> Thanks Robert for previous assistance the Template I'm working on is nearing
> completion....
[quoted text clipped - 25 lines]
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.718 / Virus Database: 474 - Release Date: 09/07/04
Roger Knowles - 12 Aug 2004 21:25 GMT
Jezabel, Many thanks

Your code did the trick with one minor alteration.  I added a variable to
check the section count and then in the Sections(2) I replaced with the
variable+1

you guys are great, thanks

As a trainer sometimes delegates are amazed by my knowledge of Apps...., I
am amazed by your knowledge......

Roger

> It's a little hard to advise since you haven't posted your code, but this
> sort of macro problem usually arises if you try to 'navigate' in your macro
[quoted text clipped - 47 lines]
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.718 / Virus Database: 474 - Release Date: 09/07/04
 
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.