![]() |
|
#2
|
||||
|
||||
|
I'd be surprised if any of the footer content was correct with that code - as posted all you'd end up with in the footer is ' af ', since:
Code:
.Footers(wdHeaderFooterPrimary).Range.Text = " af " Code:
.Footers(wdHeaderFooterPrimary).Range.Fields.add Selection.Range Try: Code:
Public Sub headerFooter(f As Form, bD As Word.Document)
With bD.Sections(1)
.Headers(wdHeaderFooterPrimary).Range.Text = "Alle registrerede data vedr. PersonId: " & f.PersonID & " " & HentFMENavn(f.PersonID)
With .Footers(wdHeaderFooterPrimary).Range
.Text = "Sammensat " & StrConv(Format(Date, "dddd"), vbProperCase) & " den " & Date & vbTab & vbTab & "Side "
.Fields.Add .Characters.Last, wdFieldEmpty, "PAGE", False
.InsertAfter " af "
.Fields.Add .Characters.Last, wdFieldEmpty, "NUMPAGES", False
End With
End With
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I have 20 page word document with a footer. Can i change page # 10 footer only? | aligahk06 | Word | 2 | 10-25-2017 04:53 AM |
Showing "page of numpages" and "sectionpage of sectionpages"
|
RobH | Word | 2 | 02-14-2016 04:12 PM |
begin each section with page 1 in header PLUS continuous page numbering in footer
|
onemorecupofcoffee | Word | 18 | 09-04-2013 04:31 PM |
| Need help with quickparts(fields) in footer | Nighthawk | Word | 2 | 08-22-2012 05:13 AM |
Use NUMPAGES in formulae
|
Friedebarth | Word | 1 | 11-30-2011 02:22 PM |