Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

control footer setting

Status
Not open for further replies.

lemonhalls

Technical User
Jun 11, 2004
52
CA
I'm currently using this code on two footers.
They are set up as the following on the bottom of the doc

paraMark pageNumber
companyName

I'm trying to get the pageNumber to be at the bottom line and not sure how to get the paraMark to go above the pageNumber. Normally in textBody, I use selection.typeParagraph. But I'm not sure how one would incorporate it in footer.

thanks!

___________________________________
Sub insertPageNumFooter()
Dim mySection As Section

With ActiveDocument
For Each mySection In .Sections
If mySection.Index = 1 Then
.Sections(mySection.Index) _
.PageSetup.DifferentFirstPageHeaderFooter = True
ElseIf mySection.Index = 2 Then
.Sections(mySection.Index) _
.PageSetup.DifferentFirstPageHeaderFooter = True
Else
.Sections(mySection.Index) _
.PageSetup.DifferentFirstPageHeaderFooter = False

'.Sections (mySection.Index) _
'.Footers(wdHeaderFooterPrimary).PageNumbers. _
'Add PageNumberAlignment:=wdAlignPageNumberRight
End If
Next mySection
End With
End Sub
 
Have you tried the macro recorder ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
yes, I tried the macro, but I can't seem to access the right aligned content.

the mouse cannot click into it and the rightalignParagraph button does not get me to the footer on the right side either. Funny, there seems to be a wall around the number, the cursor only gets as far as to the left of it, but as soon as I press shift + right arrow, it moves to the next line on the left.

do you know how I can get to the right aligned text?

Thanks,

Sally
 
PHV!

I just discovered that footers are in a text box.

Maybe, why macro didn't allow to enter into the text?
I clicked over it and it doesn' show anything.

What I did, which I don't think is the proper way to go about this was to run my report, then move the text box to where I want it, then delete all the contents except for the cover page, save it.

I ran the report again and the footer showed up where I wanted it.

Better solution?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top