Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Oct 2001
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    pagenumber in footer (word2000 dutch)

    I want to put a pagenumber (wdFieldPage) in a footer using the rangeobject, like

    ActiveDocument.Range.Sections(2).Footers(wdHeaderF ooterPrimary).Range.InsertBefore TextBox2.Text & vbTab & code for pagenumber

    Does anybody know what pagenumber code that should be? It doesn't seem to work with range.fields.add

    Rico Mazereeuw

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: pagenumber in footer (word2000 dutch)

    This worked for me. (I changed the section to 1 and hard coded the text so I didn't need your userform)

    <font face="Georgia">
    ActiveDocument.Fields.Add Range:=ActiveDocument.Range.Sections(1).Footers(wd HeaderFooterPrimary).Range, Type:=wdFieldPage
    ActiveDocument.Range.Sections(1).Footers(wdHeaderF ooterPrimary).Range.InsertBefore "Test" & vbTab
    </font face=georgia>

    StuartR

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: pagenumber in footer (word2000 dutch)

    In <post#=280266>post 280266</post#> and subsequent posts, which enhance the code a bit, there is a method that preserves the contents that might already have been in the footer, should that be needed. It's a bit more work, so if you need that, then never mind. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •