View Single Post
 
Old 02-16-2022, 11:49 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

What sort of comments do you want?

If you are iterating through objects in a collection, what is the point of testing whether they exist? Could it be in the collection if it didn't exist? Even though you tested for its existence when it must exist, you then assumed it exists in the source document (ie first page, odd and even all present in section 1 of source doc).

Following your process, instead of the ElseIf I would have just set it to
Else
.LinkToPrevious = True
End If

I don't know what your headers/footers are like in the source document but I would expect varying page widths (margins, page sizes and orientations) and different style definitions across 1000 files so it is unlikely throwing the same content in will give you exact copies of the layout & fonts. Similarly, your code is not changing the settings for different first page or odd/even headers so that is likely to vary in results expected.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote