Page 1 of 1 1
Topic Options
#182239 - 2007-11-05 05:31 AM Office 2007 template location
Arthur Offline
Fresh Scripter

Registered: 2007-11-05
Posts: 10
hello everyone, I want to add a reg key when a key does not exist

I need add UserTemplates RED_EXPAMD_SZ J:\test

What can I do,Pls help me.


Edited by dsfadsfs (2007-11-05 06:04 AM)

Top
#182241 - 2007-11-05 06:12 AM Re: Office 2007 template location [Re: Arthur]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Well it could be that you don't have the string in quotes and you're getting an error but since you don't show or log it you don't know.


Try using this instead.

 Code:
Dim $WV
$WV = WriteValue("HKCU\Software\Microsoft\Office\12.0\Common\General","UserTemplates","j:\test","REG_EXPAND_SZ")
'Key update value: ' + @ERROR + ' - ' + @SERROR ?



How to manage templates in 2007 Office programs
http://support.microsoft.com/kb/924460

Frequently asked questions about the location of templates in Word 2003 or in Word 2007
http://support.microsoft.com/kb/826867

Provide custom Information Rights Management rights policy templates in Office 2007
http://technet2.microsoft.com/Office/en-...3.mspx?mfr=true

Create, remove, or change a trusted location for your files
http://office.microsoft.com/en-us/word/HA100319991033.aspx

Top
#182242 - 2007-11-05 06:35 AM Re: Office 2007 template location [Re: NTDOC]
Arthur Offline
Fresh Scripter

Registered: 2007-11-05
Posts: 10
Shoud I use addkey to add a regedit in HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\General


then use writevalue to change the value of regedit?


Edited by dsfadsfs (2007-11-05 06:44 AM)

Top
#182244 - 2007-11-05 09:11 AM Re: Office 2007 template location [Re: Arthur]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Nope, WriteValue will create at any level all on it's own.
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 382 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.051 seconds in which 0.021 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org