Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change a registry value with vba

Status
Not open for further replies.

Michael57

Technical User
Nov 15, 2005
131
CA
I would like to use vba code to change the following registry value which is currently "0" to "QuoteNo"

HKEY_CURRENT_USER\Software\Adobe\Acrobat PDFWriter\PDFFileNameSet

Can anyone help? Thanks in advance.
 
Slightly simpler ...
Code:
[blue]System.PrivateProfileString("","HKEY_CURRENT_USER\Software\Adobe\Acrobat PDFWriter","PDFFileNameSet") = "QuoteNo"[/blue]

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

Professional Office Developers Association
 
When I try putting
System.PrivateProfileString("","HKEY_CURRENT_USER\Software\Adobe\Acrobat PDFWriter","PDFFileNameSet") = "QuoteNo" in my code it gives Runtime Error 424 Object required
Any tips?
 
You're not using Word, then? I guess you're stuck with the API in other apps, unless you want to instantiate Word which is probably over the top :)

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

Professional Office Developers Association
 
And what about this ?
CreateObject("WScript.Shell").RegWrite "HKCU\Software\Adobe\Acrobat PDFWriter\PDFFileNameSet", "QuoteNo", "REG_SZ"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top