Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Is it possible to open a Word97 Doc from Excel97??

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Essex, England
    Posts
    459
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I am trying to write a macro that will extract a bunch of information from a spreadsheet and use it to produce letters in Word97 using mailmerge. The data extraction bit works fine and generates a data file for me, and I can switch to Word using "Application.ActivateMicrosoftApp xlMicrosoftWord", but how do I get my Word doc to open automatically?

  2. #2
    MrExcel MVP Anne Troy's Avatar
    Join Date
    Feb 2002
    Location
    Westwood NJ
    Posts
    2,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Gary, I believe this is already automated for you using Mail Merge. See the steps at my site by clicking on the Word Stuff link. Let me know if you have any problems with that. Basically, you don't need to create a separate file to do a mail merge, which has its own query options.
    ~Anne Troy

  3. #3
    Guest

    Default

    I had the same problem as you. This code should work.

    Sub MtoOpenWord()

    Dim wdApp As Object
    Set wdApp = CreateObject("Word.Application")
    wdApp.Visible = True
    wdApp.documents.Open "C:FILENAME.doc"
    End Sub

    Where FILENAME type the name of your file.

  4. #4
    Board Regular
    Join Date
    Feb 2002
    Location
    Essex, England
    Posts
    459
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    That seems to do the trick!
    Many thanks
    Gary

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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