LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Printing to PDF with specified filename

Hi,
Im working on a excel sheet and my plan is as followed:
-by pressing commandbutton, it automatically prints the file to pdf,
to a specified location, and then I want a filename specified from a
number
on one of the cells.

My code now:

Private Sub commandbutton1_Click()

Call printthis


'
End Sub

Sub printthis()


Application.ActivePrinter = "Win2PDF på Ne00:"
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, _
ActivePrinter:="Win2PDF på Ne00:", Collate:=True,
PrToFilename:="c:\filename.pdf"
End Sub

Is there someting I could insert instead of "filename.pdf" to get the
name to be the same as the number in cell E2?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
+ in filename mkrefting Excel Discussion (Misc queries) 0 October 24th 06 07:44 PM
set filename to <filename-date on open bob engler Excel Worksheet Functions 2 July 13th 06 05:11 AM
filename in Cell Leer587 Excel Discussion (Misc queries) 3 April 10th 06 06:04 PM
Add filename to footer before printing using VBA PCE Man Excel Discussion (Misc queries) 5 December 2nd 04 10:55 PM
Enable Double sided printing contiuously when printing multiple s. Lee Excel Discussion (Misc queries) 1 November 27th 04 01:58 AM


All times are GMT +1. The time now is 05:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"