I have a picture in my WS which when saving to another WS as different WS name and also PDF at the same time the picture format is all screwed up in regards to aspect ratio.
This is what I have so far.
Sub AddSheet()
Dim ws As Worksheet
Dim wh As Worksheet
Set ws = Worksheets(ActiveSheet.Name)
ActiveSheet.Copy After:=Worksheets(Sheets.Count)
Set wh = Worksheets(Sheets.Count)
If ws.Range("e14").Value <> "" Then
wh.Name = ws.Range("E14").Value
ActiveSheet.Protect
End If
strPath = ActiveWorkbook.Path & "\Invoices\"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=strPath & Range("E14"), _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
End Sub
Hope you guys can help.
This is what I have so far.
Sub AddSheet()
Dim ws As Worksheet
Dim wh As Worksheet
Set ws = Worksheets(ActiveSheet.Name)
ActiveSheet.Copy After:=Worksheets(Sheets.Count)
Set wh = Worksheets(Sheets.Count)
If ws.Range("e14").Value <> "" Then
wh.Name = ws.Range("E14").Value
ActiveSheet.Protect
End If
strPath = ActiveWorkbook.Path & "\Invoices\"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=strPath & Range("E14"), _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
End Sub
Hope you guys can help.