Jay
Wed Jul 16 17:57:37 PDT 2008
There is a property, Application.DisplayAlerts, that you can set to the value
wdAlertsNone to suppress "certain alerts and messages" (in the words of the VBA
help topic). This won't suppress _all_ prompts, but it's worth a try.
On Wed, 16 Jul 2008 12:57:01 -0700, Lynn <Lynn@discussions.microsoft.com> wrote:
>Thanks Jay. Your suggestion worked for this situation. Is there a general
>statement to supress any prompts that may pop up (ie it can be used in any
>situation)?
>
>"Jay Freedman" wrote:
>
>> Lynn wrote:
>> > I have created a macro that performs some actions & then closes the
>> > active file. I would like to suppress the prompt that appears when
>> > the file closes "Do you want to save the changes to Document X?" (ie
>> > close the file without saving any changes) Is this possible? If so,
>> > how?
>>
>> There's an optional argument to the Close method that controls that. Try
>> this:
>>
>> ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
>>
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ:
http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.