Results 1 to 2 of 2

Thread: Linking with Word

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 1999
    Location
    Littlehampton, W Sussex GB
    Posts
    203
    I am creating an Activity form which will contain the name of a standard Word template document. I want to open an instance of word with this document and then let the user save their modified version of it (with a changed name) and record the name and position in my database so that next time they look at that activity on the form, the users amended document will appear.

    What is the best way to do this?

  2. #2
    Lively Member
    Join Date
    Dec 1999
    Location
    Karlsruhe, Germany
    Posts
    122
    Hi,

    let the user enter the name and location of the new document in your app.

    Then use

    Code:
    Dim objWordApp As Word.Application
    Dim objWordDoc As Word.Document
    
    Set objWordApp = New Word.Application
    Set objWordDoc = objWordApp.Documents.Add("template.dot")
    objWordDoc.SaveAs strNewNameVar, Word.wdFormatDocument
    objWordDoc.Close
    objWordApp.Quit
    Set objWordApp = Nothing

    Eventually you want to set objWordApp.Visible = True to show the document instead of just closing Word.

    Roger

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width