B
Brock
Ok, sounds simple but...
My issue is figuring out a way to replace the # and ## at
the bottom of the code with what you can do manually
using the "Insert Page Number" and "Insert Number of
Pages" from the Header and Footer Toolbar when editing a
document. This is the last piece in a very complex
reporting process that i would appreciate getting
resolved. If anyone has any info or can point me in the
right direction i would greatly appreciate it.
PS - I know about .PageNumbers.Add but you can see from
my code why it doesn't work. I need more and i need to
control it more than what is provided. You can do it
manually so you should be able to do it programatically
(well in theory anyway).
Brock W Denys
Sunbaked Software Inc.
(code below)
With docWD.Sections(1).Headers(wdHeaderFooterPrimary)
Set rngWD = docWD.Sections(1).Headers
(wdHeaderFooterPrimary).Range
.Range.Tables.Add rngWD, 1, 2
.Range.InlineShapes.AddPicture
FileName:="C:\bitmap.bmp"
.Range.Paragraphs.Alignment = wdAlignParagraphLeft
.Range.Tables(1).Cell(1, 2).Range.InsertAfter ("Line
1" & vbCrLf & "Line 2" & vbCrLf & "Page # of ##")
End With
My issue is figuring out a way to replace the # and ## at
the bottom of the code with what you can do manually
using the "Insert Page Number" and "Insert Number of
Pages" from the Header and Footer Toolbar when editing a
document. This is the last piece in a very complex
reporting process that i would appreciate getting
resolved. If anyone has any info or can point me in the
right direction i would greatly appreciate it.
PS - I know about .PageNumbers.Add but you can see from
my code why it doesn't work. I need more and i need to
control it more than what is provided. You can do it
manually so you should be able to do it programatically
(well in theory anyway).
Brock W Denys
Sunbaked Software Inc.
(code below)
With docWD.Sections(1).Headers(wdHeaderFooterPrimary)
Set rngWD = docWD.Sections(1).Headers
(wdHeaderFooterPrimary).Range
.Range.Tables.Add rngWD, 1, 2
.Range.InlineShapes.AddPicture
FileName:="C:\bitmap.bmp"
.Range.Paragraphs.Alignment = wdAlignParagraphLeft
.Range.Tables(1).Cell(1, 2).Range.InsertAfter ("Line
1" & vbCrLf & "Line 2" & vbCrLf & "Page # of ##")
End With