Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Please help me to write a macro that would allow me open a
merged word doc. from Excel. The document already has a datasource. Is this possible? Please help soon. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here are a couple of macros that should help.
Sub openxmas() Dim appWD As Object Dim wdDoc As Document Set appWD = CreateObject("Word.Application") appWD.Visible = True appWD.ChangeFileOpenDirectory ActiveWorkbook.Path appWD.Documents.Open Filename:="XmasListEnvelopes.doc" Set wdDoc = appWD.ActiveDocument End Sub Sub OpenDocument() Dim wdApp As Word.Application strFilename = "XmasListEnvelopes1.doc" Set wdApp = CreateObject("Word.Application") With wdApp .Documents.Open Filename:=ThisWorkbook.Path & "\" & strFilename .Visible = True End With Set wdApp = Nothing End Sub -- Don Guillett SalesAid Software "Tonja" wrote in message ... Please help me to write a macro that would allow me open a merged word doc. from Excel. The document already has a datasource. Is this possible? Please help soon. Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you very much.
-----Original Message----- Here are a couple of macros that should help. Sub openxmas() Dim appWD As Object Dim wdDoc As Document Set appWD = CreateObject("Word.Application") appWD.Visible = True appWD.ChangeFileOpenDirectory ActiveWorkbook.Path appWD.Documents.Open Filename:="XmasListEnvelopes.doc" Set wdDoc = appWD.ActiveDocument End Sub Sub OpenDocument() Dim wdApp As Word.Application strFilename = "XmasListEnvelopes1.doc" Set wdApp = CreateObject("Word.Application") With wdApp .Documents.Open Filename:=ThisWorkbook.Path & "\" & strFilename .Visible = True End With Set wdApp = Nothing End Sub -- Don Guillett SalesAid Software "Tonja" wrote in message ... Please help me to write a macro that would allow me open a merged word doc. from Excel. The document already has a datasource. Is this possible? Please help soon. Thanks. . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why Does Word Document Open Different On XP and Vista? | Excel Discussion (Misc queries) | |||
open word document in excel | Excel Discussion (Misc queries) | |||
open a new word document | Excel Discussion (Misc queries) | |||
what happens if I open an excel document in word? | Excel Discussion (Misc queries) |