Change Attached Template to the Global Template (Normal.dot)

M

Mike

I have reviewed KB Article 830561, but the VBA Script did not work for me.
It looked like it went through the documents in the selected folders, but the
attached template was unchanged. If anyone has had any success with this
please let me know.

Thanks.
 
J

Jay Freedman

Hi Mike,

You're talking about the macro in Method 4, right? When you pasted the
code into the VBA editor, did you change the line that says

OldServer = "{enter the name of the Old Server}"

to something like

OldServer = "OldFileServer"

or whatever the name of the old server was? If you didn't do that, the
macro will simply open each file, determine that the string "{enter
the name of the Old Server}" doesn't match what's in the file, and
close the file without changing it.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
M

Mike

I did change the line to the name of our the old server, but that did not
work. Any other ideas?

Thanks,
Mike
 
J

Jay Freedman

Hi Mike,

I don't see anything in the macro that looks wrong (I should hope not,
but I've occasionally seen code in a KB article that overlooked some
possible condition). It's time to go into debugging mode.

Between the lines

strPath = dlgTemplate.Template

If LCase(Left(strPath, nServer)) = LCase(OldServer) Then

add these lines:

MsgBox "Doc: " & strFileName & vbCr & _
"Template: " & Left(strPath, nServer) & vbCr & _
"OldServer: " & OldServer

Run the macro again. As each message box appears, compare the
"Template" value to the "OldServer" value. If they're different (not
counting upper/lower case), that would explain why the Normal.dot
template isn't being attached. Look for unexpected spaces, transposed
letters, confusion of zero for oh or one for ell, different
punctuation, etc.

If you see the problem early on, you don't have to continue to the end
of the folder. Press Ctrl+Break to stop the macro.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top