Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How can I open a named Word doc from an Excel macro

I can start Word by using Application.activatemicrosoftapp
xlmicrosoftword but this alsways opens a blank document. I
need to open an existing document to add something to it.


Any ideas??
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 194
Default How can I open a named Word doc from an Excel macro

This is what I use:

Dim Word As New Word.Application
Dim WordDoc As New Word.Document
Dim Doc As String

Doc = "C:\insert file path and doc name here.doc"
Set WordDoc = Word.Documents.Open(Doc)
Word.Selection.WholeStory
Word.Selection.Copy

HTH
Ed

"Graham Davies" wrote in message
...
I can start Word by using Application.activatemicrosoftapp
xlmicrosoftword but this alsways opens a blank document. I
need to open an existing document to add something to it.


Any ideas??



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default How can I open a named Word doc from an Excel macro

Graham,

Here's an example

Dim wordApp As Object

Set wordApp = CreateObject("Word.Application")
wordApp.Documents.Open Filename:="d:\Bob\My Documents\Excel.doc"
wordApp.Visible = True


--

HTH

Bob Phillips

"Graham Davies" wrote in message
...
I can start Word by using Application.activatemicrosoftapp
xlmicrosoftword but this alsways opens a blank document. I
need to open an existing document to add something to it.


Any ideas??



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro - Open all word files in a directory Dileep Chandran Excel Worksheet Functions 11 December 19th 06 02:12 PM
Open another program(Word) with Excel macro? Al New Users to Excel 1 December 20th 05 08:52 PM
Macro - Open Word with Excel macro Bill Excel Discussion (Misc queries) 3 May 23rd 05 11:21 PM
Open Word Doc From Excel Macro MATT Excel Discussion (Misc queries) 4 December 14th 04 12:09 AM
open Word from excel Macro hurst,j Excel Worksheet Functions 0 December 2nd 04 03:27 PM


All times are GMT +1. The time now is 04:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"