INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Visual Basic (Microsoft) Versions 5/6 FAQ

File Conversions

Converting Your Words to PDF file format... by JasonLiew
Posted: 31 Oct 01

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

Back to Visual Basic (Microsoft) Versions 5/6 FAQ Index
Back to Visual Basic (Microsoft) Versions 5/6 Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close