Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro - Open all word files in a directory | Excel Worksheet Functions | |||
Open another program(Word) with Excel macro? | New Users to Excel | |||
Macro - Open Word with Excel macro | Excel Discussion (Misc queries) | |||
Open Word Doc From Excel Macro | Excel Discussion (Misc queries) | |||
open Word from excel Macro | Excel Worksheet Functions |