T
Thomas Sander
hello,
i hope that's the right place for my question...
this is what we want: instead of adobe acrobat or something we use the
freeware-tool 'pdfcreator' (very recommended, <http://www.pdfcreator.de.vu>
;-)). sometimes we want to send emails with our firm logo on the print. on
page 1 this is another one than one page 2, 3, 4, etc.
we use a macro to past the header in the word document. looks like this:
Sub PDFerzeugen()
Selection.HomeKey Unit:=wdStory
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.InlineShapes.AddPicture FileName:= _
"Z:\logo.eps", _
LinkToFile:=False, SaveWithDocument:=True
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.InlineShapes(1).ConvertToShape
'Page1
Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoFalse
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 269.85
Selection.ShapeRange.Width = 30.05
Selection.ShapeRange.PictureFormat.Brightness = 0.5
Selection.ShapeRange.PictureFormat.Contrast = 0.5
Selection.ShapeRange.PictureFormat.ColorType = msoPictureAutomatic
Selection.ShapeRange.PictureFormat.CropLeft = 0#
Selection.ShapeRange.PictureFormat.CropRight = 0#
Selection.ShapeRange.PictureFormat.CropTop = 0#
Selection.ShapeRange.PictureFormat.CropBottom = 0#
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionPage
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionPage
Selection.ShapeRange.Left = CentimetersToPoints(20)
Selection.ShapeRange.Top = CentimetersToPoints(0)
Selection.ShapeRange.LockAnchor = False
Selection.ShapeRange.WrapFormat.AllowOverlap = True
Selection.ShapeRange.WrapFormat.Side = wdWrapBoth
Selection.ShapeRange.WrapFormat.DistanceTop = CentimetersToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceBottom = CentimetersToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceLeft =
CentimetersToPoints(0.32)
Selection.ShapeRange.WrapFormat.DistanceRight =
CentimetersToPoints(0.32)
Selection.ShapeRange.WrapFormat.Type = wdWrapTopBottom
Selection.Copy
'Page 2
If ActiveDocument.ComputeStatistics(wdStatisticPages) > 1 Then
ActiveWindow.ActivePane.View.NextHeaderFooter
Selection.Paste
Selection.ShapeRange.Left = CentimetersToPoints(20)
Selection.ShapeRange.Top = CentimetersToPoints(0)
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
'Druck
ActivePrinter = "PDFCreator"
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
Collate:=True, Background:=False, PrintToFile:=False,
PrintZoomColumn:=0, _
PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
End Sub
----
okay so far. for further editing we need to delete these images now. but
these images now have undefined names like image15, image16 etc.
well, is there a possibility to simpy delete the images pasted just now?
how is the code?
thanks in advance says
tom
i hope that's the right place for my question...
this is what we want: instead of adobe acrobat or something we use the
freeware-tool 'pdfcreator' (very recommended, <http://www.pdfcreator.de.vu>
;-)). sometimes we want to send emails with our firm logo on the print. on
page 1 this is another one than one page 2, 3, 4, etc.
we use a macro to past the header in the word document. looks like this:
Sub PDFerzeugen()
Selection.HomeKey Unit:=wdStory
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.InlineShapes.AddPicture FileName:= _
"Z:\logo.eps", _
LinkToFile:=False, SaveWithDocument:=True
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.InlineShapes(1).ConvertToShape
'Page1
Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoFalse
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 269.85
Selection.ShapeRange.Width = 30.05
Selection.ShapeRange.PictureFormat.Brightness = 0.5
Selection.ShapeRange.PictureFormat.Contrast = 0.5
Selection.ShapeRange.PictureFormat.ColorType = msoPictureAutomatic
Selection.ShapeRange.PictureFormat.CropLeft = 0#
Selection.ShapeRange.PictureFormat.CropRight = 0#
Selection.ShapeRange.PictureFormat.CropTop = 0#
Selection.ShapeRange.PictureFormat.CropBottom = 0#
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionPage
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionPage
Selection.ShapeRange.Left = CentimetersToPoints(20)
Selection.ShapeRange.Top = CentimetersToPoints(0)
Selection.ShapeRange.LockAnchor = False
Selection.ShapeRange.WrapFormat.AllowOverlap = True
Selection.ShapeRange.WrapFormat.Side = wdWrapBoth
Selection.ShapeRange.WrapFormat.DistanceTop = CentimetersToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceBottom = CentimetersToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceLeft =
CentimetersToPoints(0.32)
Selection.ShapeRange.WrapFormat.DistanceRight =
CentimetersToPoints(0.32)
Selection.ShapeRange.WrapFormat.Type = wdWrapTopBottom
Selection.Copy
'Page 2
If ActiveDocument.ComputeStatistics(wdStatisticPages) > 1 Then
ActiveWindow.ActivePane.View.NextHeaderFooter
Selection.Paste
Selection.ShapeRange.Left = CentimetersToPoints(20)
Selection.ShapeRange.Top = CentimetersToPoints(0)
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
'Druck
ActivePrinter = "PDFCreator"
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
Collate:=True, Background:=False, PrintToFile:=False,
PrintZoomColumn:=0, _
PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
End Sub
----
okay so far. for further editing we need to delete these images now. but
these images now have undefined names like image15, image16 etc.
well, is there a possibility to simpy delete the images pasted just now?
how is the code?
thanks in advance says
tom