0

Hello all,

Forgive my ignorance but I could really use some help with writing a Word macro to open an Excel spreadsheet. Long story short is that our firm has a multitude of global (corporate) word macros that we use to open different documents and other functions. We now have an excel spreadsheet that we would like to add to that list of macros so that they can all be accessed from one simple toolbar menu in Word. Please tell me that I can have a macro in word that will open Excel with that spreadsheet? If so, can you give me a sample code for that macro?

Thank you so very much!

jgassmann@ahlerslaw.com

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Teme64
0

To open Excel:

Sub OpenExcel()
' OpenExcel Macro
  Shell ("D:\Program Files\Microsoft Office\Office10\excel.exe")
End Sub

To open Excel with a file:

Sub OpenExcel()
' OpenExcel Macro
  Shell ("D:\Program Files\Microsoft Office\Office10\excel.exe ""D:\My Documents\Countries.xls""")
End Sub

Of course, modify paths to match yours.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.