ali.b
2014/06/24, 19:21
سلام دوستان
با این کد میتونید شیت مورد نظر رو به PDF تبدیل کنین و جالب اینکه میتونین از سه تا سلول یا بیشتر به عنوان اسم فایلتون انتخاب کنید
Sub SaveAsPDF()
'Saves active worksheet as pdf using concatenation
'of A1,A2,A3
Dim fName AsString
With ActiveSheet
fName = .Range("A1").Value & .Range("A2").Value & .Range("A3").Value
.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\My Documents\" & fName, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
EndWith
EndSub
با این کد میتونید شیت مورد نظر رو به PDF تبدیل کنین و جالب اینکه میتونین از سه تا سلول یا بیشتر به عنوان اسم فایلتون انتخاب کنید
Sub SaveAsPDF()
'Saves active worksheet as pdf using concatenation
'of A1,A2,A3
Dim fName AsString
With ActiveSheet
fName = .Range("A1").Value & .Range("A2").Value & .Range("A3").Value
.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\My Documents\" & fName, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
EndWith
EndSub