Information Box using SaveAs xlHtml

M

Mark C.

I am using code that allows the user to imbed the Excel spread sheet into the
body of an Email. I want to automatically accept without user input on the
information box that runs when I use SaveAs to xlHtml. The code works but
the box is annoying.


TempFile = Environ$("temp") & "/" & _
Format(Now, "dd-mm-yy h-mm-ss") & ".htm"
Nwb.SaveAs TempFile, xlHtml
Nwb.Close False
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.GetFile(TempFile).OpenAsTextStream(1, -2)
SheetToHTML = ts.ReadAll
ts.Close
Set ts = Nothing
Set fso = Nothing
Set Nwb = Nothing
Kill TempFile
End Function

The box states:
“The following features from your workbook will not be saved in the Web page:
Lists
Do you want to continue saving as a Web page?â€
The choices are Yes No
This may be a built in function of Excel using VBA that can not be gotten
around. Any suggestions or help will be greatly appreciated.
 

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