Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Convert XLS to PDF

Hi

Im running into trouble writing an XLS sheet to PDF conversion. The
code writes the PDF file but it coms back with an error.

Sub pdfPrint()

Dim MyPath As String
Dim SourceString As String, OutputString As String, Suffix As String
Dim fName As String

fName = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4)
MyPath = "C:\Documents and Settings\EitanS.SSI\Desktop"
Suffix = Format(Date, "ddmmmyy")
OutputString = MyPath & "\" & fName & Suffix & ".pdf"

Application.ActivePrinter = "Adobe PDF on Ne01:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, printtofile:=True,
ActivePrinter:="Adobe PDF on Ne01:", Collate:=True,
prtofilename:=OutputString

End Sub

I have come across other code which works in older versions of Adobe
but not with Adobe 7 in Windows XP Pro.

All help appreciated.

Eitan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Convert XLS to PDF

I have realised the problem which has lead to a further problem...
When working with Acrobat 6.0 and up, it writes its settings for
processing into the registry, which in the past versions used to be an
ini file in the windows directory.

What im looking for now is a way to edit the right registry files for
the writing of the file to my chosen directory, with no window being
displayed and to my chosen name.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default Convert XLS to PDF

Eitan,

I believe by default Acrobat writes the PDF into "C:\..My Documents". I work
around this by simply copying the PDF from there into my desired destination
folder, then delete the original.

HTH/

"EitanSA" wrote:

I have realised the problem which has lead to a further problem...
When working with Acrobat 6.0 and up, it writes its settings for
processing into the registry, which in the past versions used to be an
ini file in the windows directory.

What im looking for now is a way to edit the right registry files for
the writing of the file to my chosen directory, with no window being
displayed and to my chosen name.

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Convert XLS to PDF

Hi quartz,

Thanks for the reply.

I am looking to be more control of what is done by the writer, as what
I am trying to do is create a package that may be used on one or
several machines. I rather not have to go to each machine and manually
control the writer.

In the interim though, I will follow your advice.

Thanks

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
can the "convert" function in excel convert to UK gallons? JR Excel Discussion (Misc queries) 2 April 24th 08 04:55 PM
convert value in word. For Exampe Rs.115.00 convert into word as . Shakti Excel Discussion (Misc queries) 1 May 10th 05 12:00 PM
convert decimal number to time : convert 1,59 (minutes, dec) to m agenda9533 Excel Discussion (Misc queries) 8 January 20th 05 10:24 PM
Convert Time...!convert tenths of a second Pape Excel Discussion (Misc queries) 2 December 16th 04 10:17 AM


All times are GMT +1. The time now is 04:03 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"