Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting Your Words to PDF file format...

File Conversions

Converting Your Words to PDF file format...

by  JasonLiew  Posted    (Edited  )
Firstly, you have to set the following references:
Adobe\Acrobat4.0\macros\office97\AdobePDFMakerX
Adobe\Acrobat4.0\Acrobat\Acrobat.TLB
Adobe\Acrobat4.0\Distillr\Acrodist.exe
============================================================
dim wordapp as new word.application
____________________________________________________________

Private sub

name4file = "C:\temp\ABCE.doc"

DocChange name4file 'this is passing value into function

end sub
____________________________________________________________

sub DocChange(filename as string)

wordapp.visible = false

with wordapp
.Documents.open filename

PDF 'open up another function to create pdf file

PDFSavG filename 'Save your pdf by opening another func

.Quit False
end with

set wordapp = nothing

end sub
___________________________________________________________

sub PDF

wordapp.Run macroname:="AddOurMenuItem" wordapp.Runmacroname:="AdobePDFMaker.AutoExec.DoPrintWithLinks"

end sub
____________________________________________________________

sub PDFSavG(name as string)


filecopy name, "C:\ABCD.doc"

end sub


Thats all for the program. Try it out. If you can't fix it in 20, ask for someone who can. see ya.

CHECK IT OUT...
Nick in forum: JasonLiew
email: c0ol82@hotmail.com
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top