![]() |
#1
|
|||
|
|||
![]()
How can I add the file name automatically in the Excel VBA code?
ActiveSheet.Select ActiveSheet.PageSetup.PrintArea = "$A$1:$AE$40" ActiveSheet.PageSetup.Orientation = xlPortrait ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="\\D:\MDH_Data\Delivery Notes\Print_DeliveryNote_001.pdf", Quality:=xlQualityStandard, IgnorePrintAreas:=False Note: Print_DeliveryNote_001.pdf. This file name should be taken automatically from DeliveryNote.xlsx Cell "D4" and put in the below code line. ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="\\D:\MDH_Data\Delivery Notes\Print_DeliveryNote_001.pdf", Quality:=xlQualityStandard, IgnorePrintAreas:=False |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
gsbpxw | Word VBA | 2 | 06-11-2018 03:05 AM |
![]() |
klpw | Excel Programming | 1 | 01-14-2016 08:05 PM |
![]() |
commissarmo | Word VBA | 3 | 03-14-2015 12:53 AM |
![]() |
mradmin | Excel | 6 | 10-16-2013 10:34 AM |
![]() |
fuchsd | Word | 6 | 10-25-2011 05:52 AM |