Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Open Word From Excel, Different Actions

Hello,
I created a mail merge word document, data comes from Excel.
When i navigate to Labels.doc and open it from Windows explorer, i get
prompted:

Opening this document will run the following SQL Command.....
Data from your database will replace existing data....

Which is what i want.

However, if i run the following code from Excel, the document opens,
but doesn't prompt me and it contains unrefreshed data.

Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document

Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
Set wrdDoc = wrdApp.Documents.Open("c:\labels.doc")

How can i force Word it to re-read/refresh the data when opening from
VBA?

thanks
Ron

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
Excel Hyperlink doesn't open Word doc the same way as Word does duugg Excel Discussion (Misc queries) 2 October 12th 06 03:14 PM
Choose (open) workbook for actions on user prompt erikhs[_7_] Excel Programming 2 May 16th 06 01:47 PM
How to open a word doc while in Excel Katie Excel Discussion (Misc queries) 5 February 21st 06 07:56 PM
open word doc from within excel with VBA Luc[_3_] Excel Programming 1 March 20th 05 06:56 PM
Graph Excel Selection, Open Word File, Embed Graph Into Word Steve Excel Programming 0 November 17th 03 05:35 PM


All times are GMT +1. The time now is 09:46 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"