G
Greg Maxey
I fear the answer is no, but hopefully someone knows a way or a better way
to achieve the goal.
I have a serialized numbered document (some file management system
requirement) that needs to have a company letterhead applied, company
letterhead styles applied, and mirror the page setup of the company
letterhead.
I know that I can pseudo copy PageSetup properties between documents like
this:
Sub Practice()
Dim oDoc1 As Word.Document
Dim oDOc2 As Word.Document
Set oDoc1 = Documents(1)
Set oDOc2 = Documents(2)
With oDoc1.PageSetup
.BottomMargin = oDOc2.PageSetup.BottomMargin
.LeftMargin = oDoc1.PageSetup.LeftMargin
'etc.
End With
End Sub
I was wondering if there is a way to loop through each of the PageSetup
properties rather than do it one property at a time? Or is there a way to
simply set the "complete" pagesetup of one document to = that of another
document?
Thanks.
--
Greg Maxey
See my web site http://gregmaxey.mvps.org
for an eclectic collection of Word Tips.
"It is not the critic who counts, not the man who points out how the strong
man stumbles, or where the doer of deeds could have done them better. The
credit belongs to the man in the arena, whose face is marred by dust and
sweat and blood, who strives valiantly...who knows the great enthusiasms,
the great devotions, who spends himself in a worthy cause, who at the best
knows in the end the triumph of high achievement, and who at the worst, if
he fails, at least fails while daring greatly, so that his place shall never
be with those cold and timid souls who have never known neither victory nor
defeat." - TR
to achieve the goal.
I have a serialized numbered document (some file management system
requirement) that needs to have a company letterhead applied, company
letterhead styles applied, and mirror the page setup of the company
letterhead.
I know that I can pseudo copy PageSetup properties between documents like
this:
Sub Practice()
Dim oDoc1 As Word.Document
Dim oDOc2 As Word.Document
Set oDoc1 = Documents(1)
Set oDOc2 = Documents(2)
With oDoc1.PageSetup
.BottomMargin = oDOc2.PageSetup.BottomMargin
.LeftMargin = oDoc1.PageSetup.LeftMargin
'etc.
End With
End Sub
I was wondering if there is a way to loop through each of the PageSetup
properties rather than do it one property at a time? Or is there a way to
simply set the "complete" pagesetup of one document to = that of another
document?
Thanks.
--
Greg Maxey
See my web site http://gregmaxey.mvps.org
for an eclectic collection of Word Tips.
"It is not the critic who counts, not the man who points out how the strong
man stumbles, or where the doer of deeds could have done them better. The
credit belongs to the man in the arena, whose face is marred by dust and
sweat and blood, who strives valiantly...who knows the great enthusiasms,
the great devotions, who spends himself in a worthy cause, who at the best
knows in the end the triumph of high achievement, and who at the worst, if
he fails, at least fails while daring greatly, so that his place shall never
be with those cold and timid souls who have never known neither victory nor
defeat." - TR