Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

In Word, SaveAs MS-DOS Text avoid warning prompt

Status
Not open for further replies.

be17

Technical User
Feb 7, 2001
26
US
I am using the code below:

Sub Macro9()

ActiveDocument.SaveAs FileName:="c:\temp\name.txt", FileFormat:=100

End Sub

Is there a way to bypass/avoid the warning prompt that comes up when this code is run that says, "This file needs to be saved using the MS-DOS Text with Layout text converter. If you are not eh author of this file or if the file is not from a trusted source, using this converter may pose a security risk. Click Yes to save this file only if you are sure it is from a trusted source."?

Thanks!

be17
 
Hi be17,

Add:
Application.DisplayAlerts = False
before your 'save' line.

Cheers
 
DON'T FORGET to turn it on again in the end of the code - that is a setting that doesn't turn on again manually!

// Patrik
______________________________

To the optimist, the glass is half full. To the pessimist, the glass is half empty. To the IT Professional, the glass is twice as big as it needs to be.
 
Thanks Macropod and Patrik!

Be17
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top