All of the sudden my code which embeds an Office Web Component stopped
working and has only done so on computers that have applied the
critical Windows update
from the week of Jan 15, 2004.

Here is the snippet of code....

<object id=ChartSpace1
classid=CLSID:0002E500-0000-0000-C000-000000000046
style="width:100%;height:450"></object>

<script language=vbscript>
Sub Window_OnLoad()

Dim oChart
Dim oSeries1
dim oConst

'Ensure ChartSpace1 is empty:
ChartSpace1.Clear

Set oConst = ChartSpace1.Constants

'Create a new chart in the ChartSpace
Set oChart = ChartSpace1.Charts.Add

'Add a series of type Column
Set oSeries1 = oChart.SeriesCollection.Add

With oSeries1

.Caption = "My Percentage"
'.SetData oConst.chDimCategories, oConst.chDataLiteral,
Array(<%=chartaxes%>)
.SetData oConst.chDimValues, oConst.chDataLiteral,
Array(<%=chartvals%>)
.Type = oConst.chChartTypeSmoothLine

End With

Set mg = oChart.Axes(oConst.chAxisPositionLeft).MajorGridlines
mg.Line.Color = "white"
mg.Line.Weight = 1

Set axs = oChart.Axes (1)
axs.Font.Name = "Arial"
axs.Font.Size = "1"


'Add a second value axis to the Chart
'oChart.Axes.Add oChart.Scalings(oConst.chDimValues),
oConst.chAxisPositionRight, oConst.chValueAxis

'Display the legend
'oChart.HasLegend = True
'oChart.Legend.Position = oConst.chLegendPositionBottom

'Display the title for the chart
oChart.HasTitle = True
oChart.Title.Caption = "My Percentage"

End Sub
</script>

The VBScript error that IE is now displaying is:
"Error: Object doesn't support this property or method:
'ChartSpace1.Clear'"

It seems that it is not able to read to OBJECT tag or associate the id
with this object, so any/all properties/methods referencing this
embedded object are failing. I thought that this may be related to
Microsoft patent lawsuit with "eolas" but I cannot find a work around
(or even if this is infact the case). Anyone else experiencing
problems?

http://msdn.microsoft.com/ieupdate/activexchanges.asp

I'm on Win 2K with IE 6.0. Again - comps that didnt get the update
last week are not having the problem. Also, it is not my Internet
Zone security settings - I know that for sure.

Re: OBJECT tag web component embedding broken since windows update by Michael

Michael
Tue Jan 20 19:48:56 CST 2004

Ryan wrote:
> All of the sudden my code which embeds an Office Web Component stopped
> working and has only done so on computers that have applied the
> critical Windows update
> from the week of Jan 15, 2004.
>


I suspect...

Microsoft Security Bulletin MS02-044
http://www.microsoft.com/technet/security/Bulletin/MS02-044.asp

It's a pretty long bulletion, but the CLSID you posted is referenced
explicitly in the "Frequently Asked Questions" section (which you have to
expand manually and is itself quite long)...


> Here is the snippet of code....
>
> <object id=ChartSpace1
> classid=CLSID:0002E500-0000-0000-C000-000000000046
> style="width:100%;height:450"></object>
>
> <script language=vbscript>
> Sub Window_OnLoad()
>
> Dim oChart
> Dim oSeries1
> dim oConst
>
> 'Ensure ChartSpace1 is empty:
> ChartSpace1.Clear
>
> Set oConst = ChartSpace1.Constants
>
> 'Create a new chart in the ChartSpace
> Set oChart = ChartSpace1.Charts.Add
>
> 'Add a series of type Column
> Set oSeries1 = oChart.SeriesCollection.Add
>
> With oSeries1
>
> .Caption = "My Percentage"
> '.SetData oConst.chDimCategories, oConst.chDataLiteral,
> Array(<%=chartaxes%>)
> .SetData oConst.chDimValues, oConst.chDataLiteral,
> Array(<%=chartvals%>)
> .Type = oConst.chChartTypeSmoothLine
>
> End With
>
> Set mg = oChart.Axes(oConst.chAxisPositionLeft).MajorGridlines
> mg.Line.Color = "white"
> mg.Line.Weight = 1
>
> Set axs = oChart.Axes (1)
> axs.Font.Name = "Arial"
> axs.Font.Size = "1"
>
>
> 'Add a second value axis to the Chart
> 'oChart.Axes.Add oChart.Scalings(oConst.chDimValues),
> oConst.chAxisPositionRight, oConst.chValueAxis
>
> 'Display the legend
> 'oChart.HasLegend = True
> 'oChart.Legend.Position = oConst.chLegendPositionBottom
>
> 'Display the title for the chart
> oChart.HasTitle = True
> oChart.Title.Caption = "My Percentage"
>
> End Sub
> </script>
>
> The VBScript error that IE is now displaying is:
> "Error: Object doesn't support this property or method:
> 'ChartSpace1.Clear'"
>
> It seems that it is not able to read to OBJECT tag or associate the id
> with this object, so any/all properties/methods referencing this
> embedded object are failing. I thought that this may be related to
> Microsoft patent lawsuit with "eolas" but I cannot find a work around
> (or even if this is infact the case). Anyone else experiencing
> problems?
>
> http://msdn.microsoft.com/ieupdate/activexchanges.asp
>
> I'm on Win 2K with IE 6.0. Again - comps that didnt get the update
> last week are not having the problem. Also, it is not my Internet
> Zone security settings - I know that for sure.

--
Michael Harris
Microsoft.MVP.Scripting

Windows 2000 Scripting Guide
Microsoft® Windows®2000 Scripting Guide
http://www.microsoft.com/technet/scriptcenter/scrguide/sagsas_overview.asp

TechNet Script Center Sample Scripts
http://www.microsoft.com/downloads/release.asp?ReleaseID=38942

WSH 5.6 documentation download
http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en


Re: OBJECT tag web component embedding broken since windows update by ryanatdceg

ryanatdceg
Thu Jan 22 10:16:53 CST 2004

"Michael Harris \(MVP\)" <mikhar at mvps dot org> wrote in message news:<O5gkgC83DHA.2136@TK2MSFTNGP12.phx.gbl>...
> Ryan wrote:
> > All of the sudden my code which embeds an Office Web Component stopped
> > working and has only done so on computers that have applied the
> > critical Windows update
> > from the week of Jan 15, 2004.
> >
>
>
> I suspect...
>
> Microsoft Security Bulletin MS02-044
> http://www.microsoft.com/technet/security/Bulletin/MS02-044.asp
>
> It's a pretty long bulletion, but the CLSID you posted is referenced
> explicitly in the "Frequently Asked Questions" section (which you have to
> expand manually and is itself quite long)...
>
>
> > Here is the snippet of code....
> >
> > <object id=ChartSpace1
> > classid=CLSID:0002E500-0000-0000-C000-000000000046
> > style="width:100%;height:450"></object>
> >
> > <script language=vbscript>
> > Sub Window_OnLoad()
> >
> > Dim oChart
> > Dim oSeries1
> > dim oConst
> >
> > 'Ensure ChartSpace1 is empty:
> > ChartSpace1.Clear
> >
> > Set oConst = ChartSpace1.Constants
> >
> > 'Create a new chart in the ChartSpace
> > Set oChart = ChartSpace1.Charts.Add
> >
> > 'Add a series of type Column
> > Set oSeries1 = oChart.SeriesCollection.Add
> >
> > With oSeries1
> >
> > .Caption = "My Percentage"
> > '.SetData oConst.chDimCategories, oConst.chDataLiteral,
> > Array(<%=chartaxes%>)
> > .SetData oConst.chDimValues, oConst.chDataLiteral,
> > Array(<%=chartvals%>)
> > .Type = oConst.chChartTypeSmoothLine
> >
> > End With
> >
> > Set mg = oChart.Axes(oConst.chAxisPositionLeft).MajorGridlines
> > mg.Line.Color = "white"
> > mg.Line.Weight = 1
> >
> > Set axs = oChart.Axes (1)
> > axs.Font.Name = "Arial"
> > axs.Font.Size = "1"
> >
> >
> > 'Add a second value axis to the Chart
> > 'oChart.Axes.Add oChart.Scalings(oConst.chDimValues),
> > oConst.chAxisPositionRight, oConst.chValueAxis
> >
> > 'Display the legend
> > 'oChart.HasLegend = True
> > 'oChart.Legend.Position = oConst.chLegendPositionBottom
> >
> > 'Display the title for the chart
> > oChart.HasTitle = True
> > oChart.Title.Caption = "My Percentage"
> >
> > End Sub
> > </script>
> >
> > The VBScript error that IE is now displaying is:
> > "Error: Object doesn't support this property or method:
> > 'ChartSpace1.Clear'"
> >
> > It seems that it is not able to read to OBJECT tag or associate the id
> > with this object, so any/all properties/methods referencing this
> > embedded object are failing. I thought that this may be related to
> > Microsoft patent lawsuit with "eolas" but I cannot find a work around
> > (or even if this is infact the case). Anyone else experiencing
> > problems?
> >
> > http://msdn.microsoft.com/ieupdate/activexchanges.asp
> >
> > I'm on Win 2K with IE 6.0. Again - comps that didnt get the update
> > last week are not having the problem. Also, it is not my Internet
> > Zone security settings - I know that for sure.
>
> --
> Michael Harris
> Microsoft.MVP.Scripting
>
> Windows 2000 Scripting Guide
> Microsoft® Windows®2000 Scripting Guide
> http://www.microsoft.com/technet/scriptcenter/scrguide/sagsas_overview.asp
>
> TechNet Script Center Sample Scripts
> http://www.microsoft.com/downloads/release.asp?ReleaseID=38942
>
> WSH 5.6 documentation download
> http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en

Thank you Michael. The Bulletin link you provided has helped - I have
isolated the problem, which lies in the fact that I recently upgraded
to Office 2003. It appears the the CLSID needs to change dynamically
depending on the OWC version on the user's machine. For example,
using the following CLSID:

CLSID:0002E500-0000-0000-C000-000000000046

Produces an error when the page is accessed from users with Office
2003 or XP (I'm assuming both of these are OWC 2002). However, it
works fine on machines running Win2K or below, or Office 2K (OWC
2000). Modifying the CLSID to:

CLSID:0002E556-0000-0000-C000-000000000046

works fine OWC 2002 machines, but likwise breaks on OWC 2000 machines.

So, I assume that the solution is to dynamically embed the CLSID,
depending on the version of the OWC accessing the page. I have tried
doing this dynamically with client-side VBScript with no success. Are
there resources/code snippets anywhere that provide an example of such
logic?

Your feedback is much appreciated.

Cheers,
Ryan