ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   open word doc from within excel with VBA (https://www.excelbanter.com/excel-programming/325802-open-word-doc-within-excel-vba.html)

Luc[_3_]

open word doc from within excel with VBA
 
How can I open a word document from within excel with VBA and minimize the
document.

Chip Pearson

open word doc from within excel with VBA
 
Excel can't open Word documents, although the reverse is not the
case. You can automate Excel to open Word, and then have Word
open a document and minimize itself. E.g.,



Dim WDApp As Object
Dim WordDoc As Object
Set WDApp = CreateObject("Word.Application")
WDApp.Documents.Open Filename:="H:\Test.doc"
WDApp.WindowState = wdWindowStateMinimize



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Luc" wrote in message
...
How can I open a word document from within excel with VBA and
minimize the
document.





All times are GMT +1. The time now is 01:37 PM.

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