dismiss dialog box in word 2003

R

Ravin

Hello
I am using VB6 and trying to save an html file as a text file. Word keeps
prompting me with a dialog box stating "Linked style sheets are only
supported in web format files. By saving to this format, all links to style
sheets will be lost."

Because I am going through multiple documents, I don't want to see this
dialog box. I have tried turning the display of alerts off using
Application.DisplayAlerts = 0 (0 is the value for wdalertsnone). I have also
tried using sendkeys to send a carriage return to the dialog box where the
default button is "continue" These don't work. Any help would be greatly
appreciated.
 
M

mbaird

Dim oStyleSheet As StyleSheet

For Each oStyleSheet In ActiveDocument.StyleSheets
oStyleSheet.Delete
Next oStyleSheet
 
M

mbaird

Sorry. The code that I posted will delete the links which is what you do not
want.

Mark Baird
 
M

mbaird

It appears that this property is hanging around in memory even though they
have been removed from the document..

Remove the links first. Then save the file as an HTM file using a different
name, close and reopen that same file. Open that file and then save as a text
file.

Mark Baird
 
R

Ravin

Thank you for all your help.
I ended up doing something like you suggested. I selected the whole file
(ctrl A), copied and pasted as text to a new file, and then saved as text.
This did the trick. Thank you again for your ideas and help.
 

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