Results 1 to 2 of 2
Thread: Run-time error 5941 in Word 2010
2013-07-29, 08:12 #1
- Join Date
- May 2002
- Melbourne, Australia
- Thanked 0 Times in 0 Posts
Run-time error 5941 in Word 2010
As I cannot write VBA code, I recorded a macro to, amongst other things, insert a page number in a footer of a document, using 'Simple Number 3'. This has resulted in VBA code containing:
"C:\Users\Dale\AppData\Roaming\Microsoft\Docum ent Building Blocks\1033\14\Built-In Building Blocks.dotx" _
).BuildingBlockEntries("Plain Number 3").Insert Where:=Selection.Range, _
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
When I run this macro, it crashes with:
Run-time error 5941
The requested member of the collection does not exist.
I have checked the .dotx file it refers to and it is there and the Building Block 'Simple Number 3' does exist, so the error must be caused by something else.
In the searching I have done, prior to posting, I have come across a suggestion that:
In order to minimize Word's startup time, Microsoft programmed it to not load building blocks into memory until the first time you do something that uses them.
The suggestion is to add after the comment lines at the beginning:
In my case, adding this as suggested does NOT work.
The code also raises another critical issue.
This template is on the file server and is intended to be accessed by a number of people on the network. If the path is pointing to a specific user's local C: drive, how would this work for someone else in any event?
I would be grateful for advice on how to fix the error and how to overcome the user specific path issue.
2013-07-29, 08:46 #2
- Join Date
- Jun 2010
- Thanked 1,390 Times in 1,218 Posts