Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
using a shared printer (pdf)
Below is the code I am using to print a worksheet to pdf, and save it, all in
vba. For this to work, I have to turn off the option that says: Do not send fonts to "Adobe PDF". Is there a way to check this option with vba? I have shared this printer across a network (all users running windows xp). Then I shared the file containing the code below. when i run it from someone else's computer, I get an error that there may be a firewall. What do I need to do? CODE: Dim PSFileName As String, PDFFileName As String Dim myPDF As PdfDistiller, x As String, y As String, wb As Workbook Set wb = ActiveWorkbook Application.ActivePrinter = "\\DANS\Adobe PDF on Ne05:" If wb.Path = "" Then MsgBox "this file has to be saved first" Exit Sub End If x = ThisWorkbook.Path & "\Save Sheet as PDF" & "\" y = Left(wb.Name, Len(wb.Name) - 4) PSFileName = x & y & ".ps" PDFFileName = x & y & ".pdf" wb.PrintOut , prtofilename:=PSFileName Set myPDF = New PdfDistiller myPDF.FileToPDF PSFileName, PDFFileName, "" On Error Resume Next Kill Left(PSFileName, Len(PSFileName) - 2) & "log" Kill (PSFileName) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Issues with shared vs. non-shared formulas on somewhat wide spreadsheets | Excel Discussion (Misc queries) | |||
members on my network printer not able to print to default printer | Excel Discussion (Misc queries) | |||
Printing viewing a shared workbook on a shared drive | Excel Discussion (Misc queries) | |||
Printer Multiple Worksheets with a particular Printer Setting | Excel Worksheet Functions | |||
Send printer escape commands to a printer using VBA | Excel Programming |