Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to open a merged word document

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default How to open a merged word document

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to open a merged word document

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.



.

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
Why Does Word Document Open Different On XP and Vista? Shane Carpenter Excel Discussion (Misc queries) 3 March 17th 10 12:17 AM
open word document in excel spaceslime Excel Discussion (Misc queries) 1 August 13th 05 03:15 PM
open a new word document Ciara Excel Discussion (Misc queries) 1 May 18th 05 11:04 AM
what happens if I open an excel document in word? Emily Excel Discussion (Misc queries) 3 April 2nd 05 10:49 AM


All times are GMT +1. The time now is 06:59 PM.

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

About Us

"It's about Microsoft Excel"