ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Creating PDF's through VBA (https://www.excelbanter.com/excel-discussion-misc-queries/210560-creating-pdfs-through-vba.html)

mcp201

Creating PDF's through VBA
 
I have 3 worksheets, each with watermarked names already where I want them to
appear. In a 4th worksheet, I have the names listed of the people I want to
be watermarked in each sheet. I have my print macro working fine which is
shown below. How would I be able to alter this to be able to print my
worksheets with the watermarked names to PDF??? Thanks in advance.

Sub Print_xxx_to_printer()
Dim iStart As Integer
Dim person As String

iStart = 8
person = Worksheets("Watermark").Range("F" & iStart).Value
Do While person < ""
Worksheets("Watermark").Range("B4") = person
Worksheets("Data 1 Sheet").Select
ActiveSheet.Shapes("WordArt 17876").Select
Selection.ShapeRange.TextEffect.Text = person
ActiveSheet.Shapes("WordArt 17877").Select
Selection.ShapeRange.TextEffect.Text = person
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Worksheets("Data2 Sheet").Activate
ActiveSheet.Shapes("WordArt 26").Select
Selection.ShapeRange.TextEffect.Text = person
ActiveSheet.Shapes("WordArt 27").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Worksheets("Data3 Sheet").Activate
ActiveSheet.Shapes("WordArt 25").Select
Selection.ShapeRange.TextEffect.Text = person
ActiveSheet.Shapes("WordArt 26").Select
Selection.ShapeRange.TextEffect.Text = person
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
iStart = iStart + 1
person = Worksheets("Watermark").Range("F" & iStart).Value
Loop




All times are GMT +1. The time now is 07:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com