How to convert .doc file to .pdf file from Word, please ?!

A

adiercks

I am trying to convert a .doc file ( a manuscript ) to a .pdf to transfer to
Palm. Adding converters was not the answer.
 
C

Charlie Hoffpauir

I am trying to convert a .doc file ( a manuscript ) to a .pdf to transfer to
Palm. Adding converters was not the answer.

There are many programs out there that will generate a PDF from "any"
file... Acrobat is the original (expensive) one but there are also
free ones. (Google it). They install and then act like a printer....
you select the pdf generator and then "print" your file... resulting
in a PDF of your file.
Charlie Hoffpauir
http://freepages.genealogy.rootsweb.com/~charlieh/
 
G

garfield-n-odie

If you have Acrobat installed correctly, then to get it from Word
to Acrobat, you can either click on the "Convert to Adobe PDF"
button on the Acrobat toolbar in Word, or print to the Acrobat
PDFWriter printer in the File->Print menu.
 
A

adiercks

Thank you, Charlie !

Charlie Hoffpauir said:
There are many programs out there that will generate a PDF from "any"
file... Acrobat is the original (expensive) one but there are also
free ones. (Google it). They install and then act like a printer....
you select the pdf generator and then "print" your file... resulting
in a PDF of your file.
Charlie Hoffpauir
http://freepages.genealogy.rootsweb.com/~charlieh/
 
D

Doug Robbins - Word MVP

With Dialogs(wdDialogFilePrintSetup)
.Printer = "Adobe PDF" 'or whatever pdf converter you are using such as
"PrimoPDF", which is a free one
.DoNotSetAsSysDefault = True
.Execute
End With
ActiveDocument.PrintOut


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
G

Gordon Bentley-Mix

Most PDF creation software installs as a "printer" in Word. Therefore, you
should be able to use your favourite bit of code for printing a document and
just specify the PDF printer. This can be as simple as setting the
ActivePrinter property to whatever the PDF printer is called and using
ActiveDocument.PrintOut. See the VBA help topics on the ActivePrinter
property and the PrintOut method for more information.
 
G

Graham Mayor

Others have commented on 'printing' to the PDF driver, which may work for
you, but to program the equivalent of the Convert to Adobe PDF function is a
tad more complicated and requires a reference to the AdobePDFMakerForOffice
object to be set. You could them use this code, which came up recently in
this forum to Convert to PDF.


Sub ConvertToPDF()
Dim pdfname, i, a
Dim pmkr As AdobePDFMakerForOffice.PDFMaker
Dim stng As AdobePDFMakerForOffice.ISettings
With ActiveDocument
'The document must be saved - so save it!
.Save
Set pmkr = Nothing ' locate PDFMaker object
For Each a In Application.COMAddIns
If InStr(UCase(a.Description), "PDFMAKER") > 0 Then
Set pmkr = a.Object
Exit For
End If
Next
If pmkr Is Nothing Then
MsgBox "Cannot Find PDFMaker add-in", vbOKOnly, ""
Exit Sub
End If
pdfname = Left(.name, InStrRev(.name, ".")) & "pdf"
' delete PDF file if it already exists
If Dir(pdfname) <> "" Then Kill pdfname
pmkr.GetCurrentConversionSettings stng
stng.AddBookmarks = True ' make desired settings
stng.AddLinks = True
stng.AddTags = False
stng.ConvertAllPages = True
stng.CreateFootnoteLinks = True
stng.CreateXrefLinks = True
stng.OutputPDFFileName = pdfname
stng.PromptForPDFFilename = False
stng.ShouldShowProgressDialog = True
stng.ViewPDFFile = False
pmkr.CreatePDFEx stng, 0 'perform conversion
If Dir(pdfname) = "" Then ' see if conversion failed
MsgBox "Could not create " & pdfname, vbOKOnly, "Conversion failed"
End If
End With
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
N

Nanning99

Thank you, Doug, Gordon, Brian, and Graham.

Graham Mayor said:
Others have commented on 'printing' to the PDF driver, which may work for
you, but to program the equivalent of the Convert to Adobe PDF function is a
tad more complicated and requires a reference to the AdobePDFMakerForOffice
object to be set. You could them use this code, which came up recently in
this forum to Convert to PDF.


Sub ConvertToPDF()
Dim pdfname, i, a
Dim pmkr As AdobePDFMakerForOffice.PDFMaker
Dim stng As AdobePDFMakerForOffice.ISettings
With ActiveDocument
'The document must be saved - so save it!
.Save
Set pmkr = Nothing ' locate PDFMaker object
For Each a In Application.COMAddIns
If InStr(UCase(a.Description), "PDFMAKER") > 0 Then
Set pmkr = a.Object
Exit For
End If
Next
If pmkr Is Nothing Then
MsgBox "Cannot Find PDFMaker add-in", vbOKOnly, ""
Exit Sub
End If
pdfname = Left(.name, InStrRev(.name, ".")) & "pdf"
' delete PDF file if it already exists
If Dir(pdfname) <> "" Then Kill pdfname
pmkr.GetCurrentConversionSettings stng
stng.AddBookmarks = True ' make desired settings
stng.AddLinks = True
stng.AddTags = False
stng.ConvertAllPages = True
stng.CreateFootnoteLinks = True
stng.CreateXrefLinks = True
stng.OutputPDFFileName = pdfname
stng.PromptForPDFFilename = False
stng.ShouldShowProgressDialog = True
stng.ViewPDFFile = False
pmkr.CreatePDFEx stng, 0 'perform conversion
If Dir(pdfname) = "" Then ' see if conversion failed
MsgBox "Could not create " & pdfname, vbOKOnly, "Conversion failed"
End If
End With
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>




.
 
N

Nanning99

I had forgotten about the SendKeys command, so I tried (and have had success)
using the following commands to solve the problem I posed (a VB command that
does the equivalent of clicking the "Convert to Adobe PDF" button). I used
the SendKeys command with the menu hot keys:

SendKeys "%(B)", True ' % for Alt; B for hot key in "Adobe PDF" menu item
SendKeys "C", True ' C for hot key in "Convert to Adobe PDF" under above menu
 
N

Nanning99

So sorry. I put parentheses instead of brackets--{}--in the first command. It
should be:

SendKeys "%{B}", True ' % for Alt; B for hot key in "Adobe PDF" menu item
SendKeys "C", True ' C for hot key in "Convert to Adobe PDF" under above menu
 
N

Nanning99

Again, my apologies. I was right the first time. (I use the macro at work,
but I cannot access the discussion group at work, so I've been doing this by
memory.) The 1st line does use parentheses--(B)--rather than braces:

SendKeys "%(B)", True ' % for Alt; B for hot key in "Adobe PDF" menu item
SendKeys "C", True ' C for hot key in "Convert to Adobe PDF" under
above menu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top