Results 1 to 2 of 2

Thread: [Resolved] how to run a word macro from Excel

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2003
    Location
    france
    Posts
    71

    [Resolved] how to run a word macro from Excel

    I want to transfer some pieces of information from Excel to a word document
    then save it as a new word document
    Last edited by writelearner; Mar 24th, 2005 at 01:47 PM.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jun 2003
    Location
    france
    Posts
    71

    Re: how to run a word macro from Excel

    sorry it was already in the forum
    this code works

    VB Code:
    1. Sub test()
    2.  
    3. Dim objExcel As Object
    4. Set objExcel = CreateObject("word.Application")
    5. ' Make Excel visible'
    6. objExcel.Visible = True
    7.  
    8. 'Open template'
    9. Dim wb As Object
    10. Set wb = objExcel.documents.Open("F:\dummy.doc")
    11. Set wb = objExcel.Application.Run("F:\dummy.doc!mes")
    12.                
    13. End Sub


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