ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Opening an already existant Word document with an Excel Macro (https://www.excelbanter.com/excel-programming/384560-opening-already-existant-word-document-excel-macro.html)

tan

Opening an already existant Word document with an Excel Macro
 
Hi,

I need to open a specific Word document while running an Excel macro. Up
until now, I've been able to open a new document in Word :

Application.ActivateMicrosoftApp xlMicrosoftWord


Any ideas on how to accomplish that?
Thanks!


Bob Phillips

Opening an already existant Word document with an Excel Macro
 
Dim oWord as Object
Dim oDoc as Object

Set oWord = CreateObject("Word.Application")
oWord.Visible = True

Set oDoc = oWord.Documents.Open("C:\personal\bob\personal\CV - RP
(short).doc")


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Tan" wrote in message
...
Hi,

I need to open a specific Word document while running an Excel macro. Up
until now, I've been able to open a new document in Word :

Application.ActivateMicrosoftApp xlMicrosoftWord


Any ideas on how to accomplish that?
Thanks!





All times are GMT +1. The time now is 10:04 AM.

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