Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Excel 2003 macros and Cute PDF

Jan 5, 2011 6:14PM PST

Help please.....

I wish to create a macro that will automatically print a worksheet to a pdf file using CutePDF writer. When printing, cutepdf requires a filename - I want this to be the contents of say cell A1.

Is there anyone out there who can point me in the right direction to automate the insertion of a cell contents into the message box automatically through a macro.

Thanks

Dave Cooper

Discussion is locked

- Collapse -
Re: macro and pdf
Jan 5, 2011 6:38PM PST
- Collapse -
Re
Jan 5, 2011 6:49PM PST

Thanks, will have a look

- Collapse -
Re
Jan 6, 2011 9:07PM PST

Sorry - but tried and failed.

Used

Application.ActivePrinter = "CutePDF Writer on CPW2:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"CutePDF Writer on CPW2:", Collate:=True

SendKeys "abcd", True

This changes printer to Cute PDF and waits for keyboard entry but does not insert the "abcd" into filename.