I have a Word macro that opens a merge document and also opens the
corresponding source file in Excel. But when the macro closes the Word
document, the Excel spreadsheet won't close until I answer the prompt for a
save. How do I get the Excel spreadsheet to close without prompting?

Thanks.

Closing w/Save an Excel file from a Word macro by Rick

Rick
Thu Dec 04 17:57:00 CST 2003

Try setting the Saved property of the workbook to True
before closing the Word document.

>-----Original Message-----
>I have a Word macro that opens a merge document and also
opens the
>corresponding source file in Excel. But when the macro
closes the Word
>document, the Excel spreadsheet won't close until I
answer the prompt for a
>save. How do I get the Excel spreadsheet to close without
prompting?
>
>Thanks.
>
>
>.
>

Re: Closing w/Save an Excel file from a Word macro by Mark

Mark
Fri Dec 05 10:27:06 CST 2003

How do I do that?

"Rick Stebbins" <AutomateOffice@yahoo.com> wrote in message
news:042c01c3bac2$4e8a3cd0$a501280a@phx.gbl...
> Try setting the Saved property of the workbook to True
> before closing the Word document.
>
> >-----Original Message-----
> >I have a Word macro that opens a merge document and also
> opens the
> >corresponding source file in Excel. But when the macro
> closes the Word
> >document, the Excel spreadsheet won't close until I
> answer the prompt for a
> >save. How do I get the Excel spreadsheet to close without
> prompting?
> >
> >Thanks.
> >
> >
> >.
> >



Re: Closing w/Save an Excel file from a Word macro by Cindy

Cindy
Sat Dec 06 04:46:01 CST 2003

Hi Mark,

> I have a Word macro that opens a merge document and also opens the
> corresponding source file in Excel. But when the macro closes the Word
> document, the Excel spreadsheet won't close until I answer the prompt for a
> save. How do I get the Excel spreadsheet to close without prompting?
>
If mail merge is opening the Excel file, this means you've used a DDE
connection to the Excel file. Chances are, you won't find any good way to
automate closing this Excel file again.

Much better would be to use an ODBC connection to the Excel file. But you
need to tell us which version of Word you're using before we can tell you how
to get an ODBC connection.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)


Re: Closing w/Save an Excel file from a Word macro by Mark

Mark
Fri Jan 16 17:39:01 CST 2004

Word 2000 (9.0.6926 SP-3).

"Cindy M -WordMVP-" <C.Meister-C@hispeed.ch> wrote in message
news:VA.00008dba.007846b5@speedy...
> Hi Mark,
>
> > I have a Word macro that opens a merge document and also opens the
> > corresponding source file in Excel. But when the macro closes the Word
> > document, the Excel spreadsheet won't close until I answer the prompt
for a
> > save. How do I get the Excel spreadsheet to close without prompting?
> >
> If mail merge is opening the Excel file, this means you've used a DDE
> connection to the Excel file. Chances are, you won't find any good way to
> automate closing this Excel file again.
>
> Much better would be to use an ODBC connection to the Excel file. But you
> need to tell us which version of Word you're using before we can tell you
how
> to get an ODBC connection.
>
> Cindy Meister
> INTER-Solutions, Switzerland
> http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
> http://www.mvps.org/word
>
> This reply is posted in the Newsgroup; please post any follow question or
> reply in the newsgroup and not by e-mail :-)
>