Results 1 to 2 of 2

Thread: Is it possible to access Excel macro in Word?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2012
    Posts
    22

    Cool Is it possible to access Excel macro in Word?

    Hi folks,

    I need to know is there any way to access excel macro in MSOffice word application?

    Regards,
    Deepak Gopikannan

  2. #2
    Member
    Join Date
    Jan 2012
    Posts
    50

    Re: Is it possible to access Excel macro in Word?

    You could try something like:

    Code:
    Sub RunExcelMacro
    
    Dim xlApp as Object
    
    Set xlApp = CreateObject("Excel.Application")
    xlApp.Run "'fileNameOfWorkbook.xlsm'!nameOfMacroToRun"
    
    End Sub
    Please test any VBA code I suggest in a copy of your file. If the code errors or deletes your data it is not able to be undone.

    Home: Mac Book Pro | Snow Leopard | Excel for Mac 2011
    Home: Windows 7 | MS Office 2010 (Running on Parallels Desktop as a VM)
    Work: Windows 7 | MS Office 2010

Tags for this Thread

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