bitte wieder um hilfe. mein code exportiert das active sheet als pdf auf den dektop.das funktioniert ansich sehr gut, nur in bestimmen zellen wird die formatierung unleserlich.
mir ist aufgefallen, dass bestimmte schriftarten gar nicht gut funktionieren. im untenstehenden screenshot ist das problem besser zu sehen. es sind in dieser zelle recht viele zeilenumbrueche, die ich nicht verhindern kann, da die quelldatei von anderer seite kommt.
vielen dank im voraus,
liebe gruesse,
martin
das ist der code:
Sub PDF_Print_Sheet_gut()
'Modifiziert
Dim wks As Worksheet
For Each wks In ActiveWindow.SelectedSheets
With ActiveSheet.PageSetup
.Orientation = xlLandscape
.FitToPagesWide = 1
.PrintTitleRows = "$1:$1"
.PrintTitleColumns = ""
'.Zoom = False
'.FitToPagesTall = 0
End With
Cells.EntireColumn.Borders(xlEdgeTop).LineStyle = xlDot
Cells.EntireColumn.Borders(xlEdgeRight).LineStyle = xlDot
Cells.EntireColumn.Borders(xlEdgeLeft).LineStyle = xlDot
Cells.EntireColumn.Borders(xlInsideVertical).LineStyle = xlDot
Cells.EntireColumn.Borders(xlInsideHorizontal).LineStyle = xlDot
Rows("1:1").Borders(xlEdgeBottom).LineStyle = xlDouble
With ActiveSheet.PageSetup
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
.CenterHeader = "Amiri Flight - SPOC Contingency Sheet - TOP SECRET"
.LeftFooter = "&""-,Fett""&8 &A" & Chr(10) & "Amiri Flight"
'CenterFooter = "Printed by: " & Environ("username") 'Das waere mit Username Zusatz, _
_
_
so wie der User am Computer angemeldet ist
.CenterFooter = "TOP SECRET!"
.RightFooter = "&8&D - &t" & Chr(10) & "Page &P of &N"
.PrintErrors = xlPrintErrorsDisplayed
End With
With wks
.Select
'"C:\Users\" & Environ("Username") & "\Desktop\" & .Name & ".pdf"
.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"\\psf\Home\Desktop\" & .Name & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
End With
Next wks
End Sub
im excel schaut dieser text so aus:
"Task Reference 1.4
Check if station has a contract with a fuel provider at destination, check list below
a) If no contract: Follow up on task ""Request Fuel Quote""
b) If contracted: Follow up on task ""Arrange fuel""
1 Africa Egypt Cairo CAI ASM
2 Europe Spain Barcelona BCN Air BP
3 Europe Italy Rome CIA Air Total
4 Europe Italy Milan MXP Air Total
5 Europe France Paris LBG Shell
6 Europe France Nice NCE Air BP
7 Europe UK London LGW Air BP
8 Europe UK London LHR Air BP
9 Europe UK London STN Air Total
10 America USA New York JFK WFS
11 America USA Los Angeles LAX WFS
"
im pdf dann so: