drom
Well-known Member
- Joined
- Mar 20, 2005
- Messages
- 527
- Office Version
- 2021
- 2019
- 2016
- 2013
- 2011
- 2010
- 2007
Hi!
When I click Control + F2, I can see a print preview on my active sheet.
But some times since I do not have any printer, I see nothing, unless I change the printer setting to put eg: Nitro or something else.
If I do so I can use the print preview perfect
Now.
I am using a file located in a public folder, and my working mates are using a macro.
This macro creates a workbook and saves a temp file (1 Excel + 1 PDF) in a folder and sends the file and the PDF file to a few customers using outlook
The macro works fine if I can see a print preview before using the calling the macro, otherwise I cant attach the PDF file in a mail
Is there anything I can do?
At present I am using:
So looks like if Excel does not see anything to preview, (I mean a printer) does not save the PDF
As a temporary solution my friends are using CONTROL + F2 (PrintPreview) to select a printer because once this is done the prior macro saves the Excel Activesheet as a PDF
But is the any solution and/or what am I missing?
Thanks
When I click Control + F2, I can see a print preview on my active sheet.
But some times since I do not have any printer, I see nothing, unless I change the printer setting to put eg: Nitro or something else.
If I do so I can use the print preview perfect
Now.
I am using a file located in a public folder, and my working mates are using a macro.
This macro creates a workbook and saves a temp file (1 Excel + 1 PDF) in a folder and sends the file and the PDF file to a few customers using outlook
The macro works fine if I can see a print preview before using the calling the macro, otherwise I cant attach the PDF file in a mail
Is there anything I can do?
At present I am using:
VBA Code:
wFxFN = "": wFxFN = wPath & wDate & wCustomer & ".xlsx"
wPDFfn = "": wPDFfn = wPath & wDate & wCustomer & ".PDF"
Kill wFxFN: Kill wPDFfn
ActiveWorkbook.SaveAs Filename:=wFxFN, FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=wPDFfn, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
If ActiveWorkbook.Name <> ThisWorkbook.Name Then ActiveWorkbook.Close
So looks like if Excel does not see anything to preview, (I mean a printer) does not save the PDF
As a temporary solution my friends are using CONTROL + F2 (PrintPreview) to select a printer because once this is done the prior macro saves the Excel Activesheet as a PDF
But is the any solution and/or what am I missing?
Thanks