View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_5_] Jim Thomlinson[_5_] is offline
external usenet poster
 
Posts: 486
Default Open Words doc from Excel Macro

Try this... You need to reference your project to the "Microsoft Word ?.?
Object Library". In the VB Editor select Tools - References ...

Sub OpenWordDoc()
Dim appWord As Word.Application

Set appWord = New Word.Application
With appWord
.Visible = True
.Documents.Open "D:\Test.doc"
End With
Set appWord = Nothing
End Sub

--
HTH...

Jim Thomlinson


"Isham Hamin" wrote:

Hi,

New to the usergroup. Question: I'm trying to create an excel macro that
will pickup filename from a spreadsheet and open the file in Words
document, then do more formatting changes to the document. I seems to be
stuck at trying to open a Words document from an excel macro. Any
thoughts? Thanks in advance.

Isham


*** Sent via Developersdex http://www.developersdex.com ***