Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Creating PDF files via 995

Hi all

I have PDF creator 995

I would like to automatically create a pdf file off an Excel* quote sheet
If I use:
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:="PDF995
on Ne00:", Collate:=True
it asks for the name of the file (and directory). It works but I don't want
to have to set the directory, type in the quote number and customer each
time

When I changed the line to the one shown below it creates a file with a pdf
extention in the correct directory but is not a readable pdf form (either
not supported file type or damaged)

Sub CreateQuotePDF()
Dim PDFFileName As String
Sheets("Quote").Select
PDFFileName = Range("Quote_Directory") & "\" & Range("Quote_Number") &
" - " & Range("Guest_Name") & ".pdf"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:="PDF995
on Ne00:", printtofile:=True, Collate:=True, prToFilename:=PDFFileName
End Sub

* Excel version 2002

What am I doing wrong?

Thanks in anticipation

Regards
Pete

Email:

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Creating PDF files via 995

I had no replies to my query so assume it can't be done :-(

So decided on a compromise: To write the info (e.g. C:\Users\Public\Heavenly
Holidays\Quotes\1503 - 2 Stafford Close - Nicolene Moodley.pdf) to the
clipboard and then simply paste it in on the file name bar when it comes up.
It includes a full path so places the file in the correct directory. an
adequate work-around. :-)

Sub CreateQuotePDF()
Dim PDFFileName As String
Dim ClipData As DataObject
Set ClipData = New DataObject
Sheets("Quote").Select
PDFFileName = Range("Quote_Directory") & "\" & Range("Quote_Number") &
" - " & Range("Unit_Name") & " - " & Range("Guest_Name") & ".pdf"
ClipData.SetText PDFFileName
ClipData.PutInClipboard
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:="PDF995
on Ne00:", Collate:=True
End Sub

Regards
Pete

Tel : Margate 03931 22334
Cell : 083 233 1628
Email:

"Pete" wrote in message
...
Hi all

I have PDF creator 995

I would like to automatically create a pdf file off an Excel* quote sheet
If I use:
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:="PDF995
on Ne00:", Collate:=True
it asks for the name of the file (and directory). It works but I don't
want to have to set the directory, type in the quote number and customer
each time

When I changed the line to the one shown below it creates a file with a
pdf extention in the correct directory but is not a readable pdf form
(either not supported file type or damaged)

Sub CreateQuotePDF()
Dim PDFFileName As String
Sheets("Quote").Select
PDFFileName = Range("Quote_Directory") & "\" & Range("Quote_Number") &
" - " & Range("Guest_Name") & ".pdf"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:="PDF995
on Ne00:", printtofile:=True, Collate:=True, prToFilename:=PDFFileName
End Sub

* Excel version 2002

What am I doing wrong?

Thanks in anticipation

Regards
Pete

Email:




Reply
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
creating help files MK Excel Programming 0 January 29th 09 07:27 PM
Network Files creating temporary files Dave Weastec Excel Discussion (Misc queries) 0 October 3rd 08 02:26 PM
CREATING PDF FILES FROM EXCEL FILES NSNR Excel Discussion (Misc queries) 2 January 31st 08 06:39 AM
Creating help files WLMPilot Excel Programming 3 February 10th 07 05:57 PM
Creating PDF Files Sophie Excel Programming 5 January 12th 05 01:58 AM


All times are GMT +1. The time now is 03:59 AM.

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

About Us

"It's about Microsoft Excel"