Sub
PDF_erstellen_und_speichern()
Dim
xlSRange
As
Range
Dim
strZielPfad
As
String
Dim
strFileName
As
String
Dim
c
As
Range
Dim
d
As
Range
With
Worksheets(
"Projektübersicht"
).Columns(1)
Set
c = .Find(What:=Worksheets(
"Auftrag"
).Cells(2, 2), LookIn:=xlValues, lookat:=xlWhole)
If
Not
c
Is
Nothing
Then
MsgBox
"nummer gefunden"
& c.Row
Worksheets(
"Auftrag"
).ExportAsFixedFormat Type:=xlTypePDF, Filename:=
"Intern"
&
" "
& Format(c.Row,
"0000"
), Quality:=xlQualityStandard, IncludeDocProperties:=
True
, IgnorePrintAreas:=
False
, From:=1,
To
:=1, OpenAfterPublish:=
False
strZielPfad =
"\\psf\Home\Desktop"
strFileName = Worksheets(
"Projektübersicht"
).Cells(c.Row, 3)
MsgBox
"Erfolgreich erstellt und gespeichert"
Else
MsgBox
"Kein Speichern möglich"
End
If
End
With
End
Sub