ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Opening a word document (https://www.excelbanter.com/excel-programming/365937-opening-word-document.html)

RobH

Opening a word document
 
From within my Excel macro, I want to open a specific word document and
paste part of my spreadsheet into a specific part of the word document.
Anybody know how?

Thanks,
RobH


Kaak[_81_]

Opening a word document
 

Dim WordApp As Object

Set WordApp = CreateObject("Word.Application")

With WordApp
.Documents.Open "C:\Filename.doc"
.Visible = True
End With

WordApp.Quit

Set WordApp = Nothin

--
Kaa
-----------------------------------------------------------------------
Kaak's Profile: http://www.excelforum.com/member.php...nfo&userid=751
View this thread: http://www.excelforum.com/showthread.php?threadid=55727



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

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