Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default vb Excel to PDF in Acrobat 6 - need help


I have an Excel XP macro to convert excel worksheets to PDF which worke
well with Acrobat 5 and Excel XP, but stopped working in an Excel 200
and Acrobat 6 enviroment.
the script is:
***
Private Sub Workbook_Open()
'refresh data of the whole workbook
ActiveWorkbook.RefreshAll
Dim PSFileName As String 'define Post script file name
PSFileName = Left(ActiveWorkbook.FullName
(Len(ActiveWorkbook.FullName) - 4)) & ".ps"
' Print the active workbook to the postscript file using Acroba
Distiller (printer driver)
ActiveWorkbook.PrintOut copies:=1, preview:=False
ActivePrinter:="Acrobat Distiller", _
printtofile:=True, collate:=True, prtofilename:=PSFileName
' Convert the postscript file to .pdf *** reamrks, to work, in eac
workbook, need to reference
'Acrobat Distiller in Excel VB editor: tools-reference-check 'Acroa
Distiller'
Dim myPDF As ACRODISTXLib.PdfDistiller
Set myPDF = New PdfDistiller
myPDF.FileToPDF PSFileName, PDFFileName, ""

ThisWorkbook.Saved = True

End Sub
***
I move the same Excel file to a workstation with Arobat 6 and Offic
2003 installed. The same script does not work any more. The first ste
to create postscript file worked. The second step to convert .ps to PD
got an error.
The statement: [Set myPDF = New PdfDistiller] got runtime error 429
activeX component can’t create object.

I noticed after installed Acrobat 5, there are two printers installed
Acrobat PDFWriter and Arobat Distiller. While after Acrobat
installed, there is only one printer installed which is Adobe PDF.
After Acrobat 6 installed, I unchecked all 6 selections in th
‘printing preference’ of the Acrobat 6 ‘Adobe PDF’ printer. That’s al
I changed with the Acrobat 6 environment.

I searched on the web and did not find related solutions. Appreciat
anyone can help. Thanks.
:confused

--
pete451
-----------------------------------------------------------------------
pete451f's Profile: http://www.excelforum.com/member.php...fo&userid=1573
View this thread: http://www.excelforum.com/showthread.php?threadid=27294

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
Excel 07/Acrobat 8.1.4 Misty Excel Worksheet Functions 4 April 9th 09 01:25 PM
excel and acrobat adobieversexcel Excel Discussion (Misc queries) 1 March 13th 07 10:05 AM
Excel to acrobat mlcavanzo Excel Worksheet Functions 2 April 28th 05 01:44 AM
how to re install Adobe Acrobat in Excel? The adobe Acrobat work. Execl error Excel Discussion (Misc queries) 1 March 17th 05 02:29 AM
Automating Acrobat from Excel Paul Falla Excel Programming 1 July 22nd 03 04:46 PM


All times are GMT +1. The time now is 10:34 PM.

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"