meant for a different list ("as previously observed")?
… i've done some of that, but it was 20 years ago, and i don't have suitable
environment to hack at it; just looking at it i wonder do you really need to
select an object to operate on it (i.e. would it work without ".Select"?)
On 2015-10-08 7:27 , Collin B wrote:
As previously observed I'm not much of a VBA guru.
Writing Excel macro.
Need to create Word document and write header with auto page numbers.
(Office 365).
Research has proven unfruitful.
This is what I've come up with.
On the .TypeText Text:="Page " line I get "object required" for some
reason. Can't figure out why.
Set objHeader =
wDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range
With objHeader.Select
.TypeText Text:="Page "
.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="PAGE
", PreserveFormatting:=True
.TypeText Text:=" of "
.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty,
Text:="NUMPAGES ", PreserveFormatting:=True
.TypeText = oText
End With
--
PDML Pentax-Discuss Mail List
[email protected]
http://pdml.net/mailman/listinfo/pdml_pdml.net
to UNSUBSCRIBE from the PDML, please visit the link directly above and follow
the directions.