![]() |
#1
|
|||
|
|||
![]()
Hi,
I am trying to make a macro that exports the current sheet as a PDF as 'invoice [cell value].pdf. I keep trying different things and am getting this error: Run-time error '1004': Document not saved. The document may be open, or an error may have been encountered when saving. This is my macro: Sub Savei() ActiveSheet.ExportAsFixedFormat _ Type:=xlTypePDF, _ Filename:="C:\invoice" & Range("G3") & ".pdf", _ Quality:=xlQualityStandard, _ IncludeDocProperties:=True, _ OpenAfterPublish:=True End Sub Thanks in advance ![]() |
Tags |
macro, pdf, save |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Document which always ask to be saved on access? | quirky | Word | 2 | 12-15-2012 11:32 AM |
![]() |
yonasan | Excel Programming | 3 | 06-12-2012 11:08 PM |
![]() |
gbaker | Excel Programming | 11 | 06-06-2012 05:23 AM |
![]() |
Jamal NUMAN | Word | 1 | 04-14-2011 04:27 AM |
Word: The document 'Filename' caused a serious error the last time ... | martincruise | Word | 0 | 02-25-2010 01:47 AM |