Publishobjects creates unwanted folders


  • I 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
    Tuesday, March 27, 2012 4:24 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.

     With TempWB.PublishObjects.Add( _
             SourceType:=xlSourceRange, _
             Filename:=TempFile, _
             Sheet:=TempWB.Sheets(1).Name, _
             Source:=TempWB.Sheets(1).UsedRange.Address, _
            .Publish (True)
        End With


    Tuesday, March 27, 2012 5:16 PM