G
Guest
I have managed to create a work document containing all the formulas in a
selected worksheet. However, when I try in Excel VBA to add a footer to the
word document only part of the footer is created. The code I am using, which
I got from running a macro in Word is
.Selection.TypeText Text:="Page "
.Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldPage
.Selection.TypeText Text:=" of "
.Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldNumPages
.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
The code lines that start with ".Selection.Fields.Add Range:" does NOT
work.
Any suggestions???
Thanks
selected worksheet. However, when I try in Excel VBA to add a footer to the
word document only part of the footer is created. The code I am using, which
I got from running a macro in Word is
.Selection.TypeText Text:="Page "
.Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldPage
.Selection.TypeText Text:=" of "
.Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldNumPages
.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
The code lines that start with ".Selection.Fields.Add Range:" does NOT
work.
Any suggestions???
Thanks