-
Jul 30th, 2010, 07:57 AM
#1
Thread Starter
Member
Suppress PDF-print pop-up
Hi all,
I have a chunck of code in Access to print a report to pdf. For every report the pdf-printer pops up the question wether I want to print the file with that particular name to that particular location - Send to Desktop, Save As, Append to other pdf's.
These are all things the code sets in advance, so I don't want this pop-up window. How do I suppress it? I am using FreePDF_XP.
Thanks in advance!
William
-
Jul 30th, 2010, 06:12 PM
#2
Re: Suppress PDF-print pop-up
read the user manual
page 10
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Jul 31st, 2010, 10:01 AM
#3
Thread Starter
Member
Re: Suppress PDF-print pop-up
hyperlink please? thanks!
-
Jul 31st, 2010, 07:05 PM
#4
Re: Suppress PDF-print pop-up
Last edited by westconn1; Jul 31st, 2010 at 07:09 PM.
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Aug 3rd, 2010, 08:12 AM
#5
Thread Starter
Member
Re: Suppress PDF-print pop-up
Thanks for the info so far.
Does anyone know how my registry file should be composed to disable the pop-up?
I have tried some stuff, but I cannot seem te get it right...
fi this does not work...
Code:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Program Files\FreePDF_XP]disabledesktop
"PDFFilename"="H:\\Macros\\Reports\\EmployeeList_20100803.PDF"
Thanks in advance!
Bill
-
Aug 3rd, 2010, 04:45 PM
#6
Re: Suppress PDF-print pop-up
CU/LM ADefaultsaveasLike pushing the Save As button. Dialog will not rise!
• CU means HKey_Current_User\Software\shbox\FreePdfXp
• LM means HKey_Local_Machine\Software\shbox\FreePdfXp
you can set the registry key from within your code and change back after
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Aug 4th, 2010, 01:54 AM
#7
Thread Starter
Member
Re: Suppress PDF-print pop-up
I'm affraid I don't understand how to use this registry file, is it sth like this?
Code:
Open strPath & "CreatePDF.reg" For Append As #1
Print #1, "Windows Registry Editor Version 5.00"
Print #1, ""
Print #1, "[HKey_Local_Machine\Software\shbox\FreePdfXp]"
Print #1, "SaveAs=0"
Print #1, """PDFFilename""=" & Chr(34) & strPDF & Chr(34)
Close #1
x = Shell("regedit.exe /s " & strPath & "CreatePDF.reg", vbHide)
Kill strPath & "CreatePDF.reg"
Set Application.Printer = Application.Printers("FreePDF XP")
DoCmd.OpenReport strReport, acViewNormal
Open strPath & "CreatePDF.reg" For Append As #1
Print #1, "Windows Registry Editor Version 5.00"
Print #1, ""
Print #1, "[HKey_Local_Machine\Software\shbox\FreePdfXp]"
Print #1, "SaveAs=1"
Print #1, """PDFFilename""=" & Chr(34) & strPDF & Chr(34)
Close #1
x = Shell("regedit.exe /s " & strPath & "CreatePDF.reg", vbHide)
Kill strPath & "CreatePDF.reg"
-
Aug 4th, 2010, 02:49 AM
#8
Re: Suppress PDF-print pop-up
there are better, more direct ways to read and write registry keys, than to shell to regedit
search on registry APIs
or registry scripting
if strpath can contain spaces shell will fail, unless the path is enclosed in quotes
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Aug 10th, 2010, 07:53 AM
#9
Thread Starter
Member
Re: Suppress PDF-print pop-up
As a matter of fact, I can't seem to get it done, I'm affraid I'm gonna have to let loose this line of thought...
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|