| |
opr8or
Posts: 1
Score: 0
Joined: 6/11/2003
From:
Status: offline
|
Hi all, any help would be greatly appreciated! I am trying to develop a script that will edit every user account's Normal.dot file regardless of which user is currently logged in. In each Normal.dot I am trying to delete an incorrect AutoTextEntry. At the moment my script will delete the entry for the current user only, even if you point it to another users Normal.dot The code might help to explain better: '*********************************************************** ' This script resets an AutoText Entry within Word 2000 ' ' Script will replace incorrect entries such as: ' "incorrect company name" in normal.dot ' for a user other than the one currently logged in. ' '*********************************************************** on error resume next Set wdapp = CreateObject("Word.Application") Set wddoc = wdapp.Documents.Open("C:\Documents and Settings\USER1\Application Data\Microsoft\Templates\Normal.dot") ' Or maybe one of the following lines: 'Set wddoc = wdapp.Documents.Add 'Set wddoc = wdapp.Documents.Add("C:\Documents and Settings\User1\Application Data\Microsoft\Templates\Normal.dot") wdapp.NormalTemplate.AutoTextEntries("incorrect company name").Delete ' The above line changes the AutoTextEntries in the CURRENT users ' Normal.dot, not the USER1 specified in the open command. ' I can't find any function to delete it for USER1's normal.dot wddoc.Styles("Signature Company").Delete wdapp.NormalTemplate.Save wddoc.SaveAs "Normal.dot", , , , , , , , , , False wddoc.Close False wdapp.Quit '************************************************************************* thanx for your time!
|
|