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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printer Ports

Status
Not open for further replies.

lasitha

Programmer
Jun 7, 2003
38
LK
Hi All,

I'm converting Access Reports to PDF format.
I want to change PDF Printer's Port. Default is
My Documents\*.pdf .

In RegEdit 2 places have that value.

1) HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/ CurrentVertion/Print/Printers/Adobe PDF/Port
My Documents\*.pdf

2) HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/
CurrentVertion/Print/Printers/Adobe PDF/DsSpooler
My Documents\*.pdf

If anybody knows to change this keys through VBA codings.

ThankX,
Lasitha




 
A starting point:
Dim strKey As String, strVal As String, sh As Object
strKey = "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print\Printers\Adobe PDF\"
strVal = "\\path\\to\\myDir\\*.pdf"
Set sh = CreateObject("WScript.Shell")
sh.RegWrite strKey & "Port", strVal
sh.RegWrite strKey & "DsSpooler", strVal
Set sh = Nothing

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 

Thank U PHV (MIS) for the reply,

I check this code, reg. Values are changed. But PDF save path still prompting My Documents folder.

Could U please help me to solve this.

ThankX in Adv.
Lasitha Alawatta.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top