Publishobjects creates unwanted folders
-
Tuesday, March 27, 2012 4:24 PMI am using the PublishObects.add function to create an html file. The file is created but and it also creates a folder for each html file. The folder contains with style sheets etc. I do not want these folders. What parameter should be omitted so these folders are not created.
- Edited by opetal Tuesday, March 27, 2012 5:04 PM
All Replies
-
Tuesday, March 27, 2012 5:16 PM
I copied the code below from Ron DeBruins webpage. He uses PublishObjects to create flat HTML files and then attaches these files to email. I hope this helps.
http://msdn.microsoft.com/en-us/library/ff519602(office.11).aspx
With TempWB.PublishObjects.Add( _
SourceType:=xlSourceRange, _
Filename:=TempFile, _
Sheet:=TempWB.Sheets(1).Name, _
Source:=TempWB.Sheets(1).UsedRange.Address, _
HtmlType:=xlHtmlStatic)
.Publish (True)
End Withjdweng
- Marked As Answer by Yoyo JiangMicrosoft Contingent Staff, Moderator Tuesday, April 03, 2012 5:15 AM

