Main Topics
Browse All Topicshi experts,
Can anybody help me? It is urgent!! I'm writing a VB program using PDFWriter driver to convert my Word doc to pdf. My problem is it keeps on asking me for a filename. My program is a batch process that needs to create individual pdf file for each record.
Dim msWord As Word.Application
Set msWord = GetObject(Class:="Word.App
msWord.Visible = False
msWord.ActivePrinter = "Acrobat PDFWriter"
msWord.Documents.Open "c:\temp\spec.doc"
msWord.ActiveDocument.Prin
How to convert a file in other language such as chinese? Convertion in english version is correct.
Thanks!!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hey,
Using PDFWriter, you can "print" the Word document to a specific pdf file, without the dialog. You will have to set a few Abode registry settings, but one of them will be to turn the dialog off as well as to specify the name of the file.
All the registry settings are defined in the Acrobat PDFWriter API Reference pdf file shipped with the full version of Acrobat (Program Files\Adobe\Acrobat SDK\Documentation\PDF_Crea
Here's some code using Word automation and PDFWriter.
'*************************
Public Const AdobeKey = "SOFTWARE\Adobe\Acrobat PDFWriter\"
Public Sub WordToPDF()
Dim oleWord As Word.Application
Dim WordDoc As Word.Document
Dim oldPrinter As String
'We are changing the Printer in Word to PDFWriter, so save the old printer here
oldPrinter = cSetPrinter.m_sPrevPrinter
Set oleWord = New Word.Application
'get word doc
Set WordDoc = oleWord.Documents.Open("c:
'Do whatever you may need to do to the word doc here
SetPDFParams "c:\somedoc.pdf", False, False
oleWord.ActivePrinter = "Acrobat PDFWriter"
WordDoc.PrintOut True
WordDoc.Close False
Set WordDoc = Nothing
Set oleWord = Nothing
cSetPrinter.SetPrinterAsDe
end sub
Public Sub SetPDFParams(Filename As String, Landscape As Boolean, ShowViewer As Boolean)
'This sets the registry settings for Adobe
Dim regsuccess As Long
On Error Resume Next
'regsuccess = RegWriteString(HKEY_CURREN
regsuccess = RegWriteString(HKEY_CURREN
If ShowViewer Then
regsuccess = RegWriteString(HKEY_CURREN
Else
regsuccess = RegWriteString(HKEY_CURREN
End If
If Landscape Then
regsuccess = RegWriteString(HKEY_CURREN
Else
regsuccess = RegWriteString(HKEY_CURREN
End If
End Sub
'*************************
Hope that helps.
Later...
Hi wilsontang,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:
Accept sclaverie's comment(s) as an answer.
wilsontang, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you. DO NOT accept this comment as an answer.
EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
Business Accounts
Answer for Membership
by: Richie_SimonettiPosted on 2002-07-02 at 21:08:30ID: 7125821
hearing...