Results 1 to 8 of 8

Problem with ActiveWorkbook.PublishObjects.Add - html file being generated without code

Threaded View

  1. #1
    Registered User
    Join Date
    12-17-2012
    Location
    Lebanon, NH, USA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Problem with ActiveWorkbook.PublishObjects.Add - html file being generated without code

    Hi,

    I have been using this forum for a lot of my issues and the solutions suggested here have almost always solved my problems. But there is this one issue I am facing and can't seem to find the answer here. So here goes:

    I am using the following code to covert a variable range to an html.

    ActiveSheet.PageSetup.PrintArea = "A2:M" & Application.WorksheetFunction.Max((Count + 13), (CountWhole + 13))
    
    With ActiveWorkbook.PublishObjects.Add(xlSourcePrintArea, _
            ThisWorkbook.Path & "\OSCSnapShotReport.htm" _
            , "Net Summary", "", xlHtmlStatic, _
            "OSCVisualSched V1_3 with pivot formulas_3721", "")
            .Publish (True)
            .AutoRepublish = True
        End With
    This code works fine and it gives me the right range of values I want. I then figured that I don't have to convert to an html so I deleted this piece of code. Now, the problem I am facing is that even after deleting this piece of code, an html file is being generated at the location above. I don't want the html. I am sure there is a small fix to this somewhere but I am clueless as to why this is happening even after deleting the code.

    Any pointers?
    Last edited by Leith Ross; 12-24-2012 at 08:53 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1