Publish an Excel 2003 Chart to HTML file

B

brettmanning24

Please can someone help publish my Excel chart to an HTML file using a
macro. I found the code:

With ActiveWorkbook.PublishObjects.Add(SourceType:=xlSourceChart,
_
Filename:="C:\Work.htm", Sheet:="Chart1", Source:="Chart 1",
_
HtmlType:=xlHtmlStatic, DivID:="Chart1_04")
.Publish (True)
End With

But it does not work, I receive the error "Compile error: Expected
Function or variable".

Can anyone help?

Thanks,

Brett
 

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