Hi Albert
I am no Adobe user so I can't help you
I am sure that Google will help you to find a example if it is possible with code
--
Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm
"Albert" wrote in message ...
Hi Ron.
I am succesfully using your RDB_Create_PDF function for creating PDF's
(thank you!)
Is there a way to make the PDFs password protected?
Thanks in advance,
Albert C.
"Ron de Bruin" wrote:
Hi gotahavit
The Ne number of a printer can be different for every user
You can try this to print to for example the Adobe PDF printer
Sub Test()
Dim str As String
Dim strNetworkPrinter As String
str = Application.ActivePrinter
strNetworkPrinter = GetFullNetworkPrinterName("Adobe PDF")
If Len(strNetworkPrinter) 0 Then
Application.ActivePrinter = strNetworkPrinter
ActiveSheet.PrintOut
End If
Application.ActivePrinter = str
End Sub
Function GetFullNetworkPrinterName(strNetworkPrinterName As String) As String
Dim strCurrentPrinterName As String, strTempPrinterName As String, i As Long
strCurrentPrinterName = Application.ActivePrinter
i = 0
Do While i < 100
strTempPrinterName = strNetworkPrinterName & " on Ne" & Format(i, "00") & ":"
On Error Resume Next ' try to change to the network printer
Application.ActivePrinter = strTempPrinterName
On Error GoTo 0
If Application.ActivePrinter = strTempPrinterName Then
GetFullNetworkPrinterName = strTempPrinterName
i = 100 ' makes the loop end
End If
i = i + 1
Loop
Application.ActivePrinter = strCurrentPrinterName ' change back to the original printer
End Function
--
Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm
"gotahavit" wrote in message ...
I have a macro that creates PDFs. Within the macro, I identify the active
printer: ActivePrinter:="Adobe PDF on Ne01:". I got this from recording a
macro. Well, when others try to use it, the Ne01 is different. For some it is
Ne03 and others Ne02. When those people run the macro it still creates a PDF,
but the font gets messed up.
Is there a way (within the macro) to identify a list of the available
printers, or the Ne# for the particular computer, or is there any other way
to go around the issue?
Thanks.