how to suppress msg boxes in VBA

G

Gerie Alards

When I convert within VBA a file from html to text file a message box appear
to
confirm because information might be lost.

for example
Documents.Open filename:=http://www.vitamine-c.nl/vitamine_c.htm,
ConfirmConversions:=False, Visible:=False
Documents(1).SaveAs "D:\t1.txt", FileFormat:=wdFormatDOSText
Documents(1).Close

because this supposed to be automated I must have to have to supress these
boxes.

thanks in advance
gerie alards
 
R

RB Smissaert

Try:

Application.DisplayAlerts = False

'Run your code here

Application.DisplayAlerts = True


RBS
 
G

Gerie Alards

Application.DisplayAlerts is not available in outlook VBA 6.3
so I tried:

Documents.Open
filename:="http://www.vitamine-c.nl/vitamine_c.htm", _
ConfirmConversions:=False, _
ReadOnly:=False, _
Visible:=True

Documents(1).Application.DisplayAlerts = wdAlertsNone

Documents(1).SaveAs "D:\t1.txt", FileFormat:=wdFormatTextthen I've to
click go further <<
Documents(1).Application.DisplayAlerts = wdAlertsAll

thanks for your alternative.
regards,
gerie alards
 
P

Perry

Try

Replace
Documents(1).Application.DisplayAlerts = wdAlertsNone
by
Application.DisplayAlerts = wdAlertsNone

What Word version are you working in, btw?

Krgrds,
Perry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top