LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Closing word from excel

One spreadsheet I'm on has textboxes on each sheet containing comments aimed
at the user, however sometimes the comments they want to enter are to big to
be printed, so I've ended up opening word from Excel in such circumstances,
then copying the text of the comments to the document. It then saves the
document and closes word and also stops the textboxes from being included in
any printout. I also have error handling that attempts to properly close word
and exit gracefully.

However I've noticed that when an error handling code is executed word asks
me if I want to save the file. I'm aware that word has the DisplayAlerts
property but uses different values from excel, and have added the pre-defined
constants to my code so that I could use pre-existing code without having to
go through and make corrections. The following two lines of code should, I
believe, end up with alerts in words disabled from excel. However this only
works when I step through the code. Running the code normally results in the
save alert still being displayed. Is there any reason for this?

WD.DisplayAlerts = wdAlertsNone
WD.Quit

Thanks for any help in advance.
 
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
closing a word document natanz[_2_] Excel Programming 2 February 2nd 06 10:33 PM
Closing a workbook without saving from Word [email protected] Excel Programming 3 June 9th 05 09:43 PM
Closing a word file? pgoodale[_5_] Excel Programming 0 January 12th 04 09:24 AM
Excel code to Wait until Word finishes printing before closing Mike Molyneaux[_2_] Excel Programming 2 October 24th 03 02:45 AM


All times are GMT +1. The time now is 01:55 AM.

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"