ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Information Box using SaveAs xlHtml (https://www.excelbanter.com/excel-programming/331370-information-box-using-saveas-xlhtml.html)

Mark C.[_2_]

Information Box using SaveAs xlHtml
 
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.

--
Thanks
Mark C.


All times are GMT +1. The time now is 12:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com