ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open Word file by Macro (https://www.excelbanter.com/excel-programming/414679-open-word-file-macro.html)

Shazi

Open Word file by Macro
 
Hi,

I prepared a menubar, and I am unable to open all excel files by
macro.

I want to open Word Document by Excel Macro. how to open word file.

Regards.

Shahzad

Mike H

Open Word file by Macro
 
try

Sub OpenDoc()
Dim WordApp As Object
Set WordApp = CreateObject("Word.Application")
WordApp.documents.Open "C:\test.doc" 'Change to suit
WordApp.Visible = True
End Sub

Mike

"Shazi" wrote:

Hi,

I prepared a menubar, and I am unable to open all excel files by
macro.

I want to open Word Document by Excel Macro. how to open word file.

Regards.

Shahzad



All times are GMT +1. The time now is 06:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com