Vba insert file name in footer of word doc -
this code have footer, need insert field file name. great!
with wdapp.activedocument.sections(1).footers(1).range.paragraphs(1) .range.text = "aa service company - heating & cooling" & vbcr & "550 anthony trail; northbrook, il 60062" & vbcr & "phone:" .range.insertafter vbcr & "page " set r = .range e = .range.end r.start = e .range.fields.add r, wdfieldpage .range.insertafter " of " e = .range.end r.start = e .range.fields.add r, wdfieldnumpages .alignment = wdalignparagraphright end
Comments
Post a Comment