Run-time error '5941': The requested member of the collection does not exist.
I recorded the following macro.
The macro can insert a footer.
However, when I run it again, it does not work.
I got the following message
Run-time error '5941':
The requested member of the collection does not exist.
How can I solve this problem?
That would seem to indicate that the buildingblock is not available. Are you running it again repeatedly in the same document or are you trying to run it in a new document that may not have the same attached template or building blocks?
Dim oRng As Word.Range
Set oRng = ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Range
Originally Posted by gmaxey
your macro does not work as well.
I tried to run it again repeatedly in the same document and also tried to run it in a new document.
I think that attached template or building blocks does exist.
However, the macro is the able to "get" the template / building block.
If so, how can i solve it?