Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2007

Tip: Looking for answers? Try searching our database.

No ProgID is available for this object.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ExcelReport - 23 Nov 2007 06:16 GMT
I have an Excel Chart object (Excel.Chart.8) in MS Word document. I'm trying
to access the chart. But I sometimes get an error. The following is my
program.

   Dim i As Integer
   Dim strProgId As String

   For i = 1 To gwdDoc.InlineShapes.Count
       With gwdDoc.InlineShapes(i)
           If .Type = wdInlineShapeEmbeddedOLEObject Then              
'wdInlineShapeEmbeddedOLEObject=1
               strProgId = .OLEFormat.ProgId                'I sometimes get an error
               If Left(strProgId, 11) = "Excel.Chart" Then
                       .OLEFormat.Activate
                       Set objOLE = .OLEFormat
                       Exit Function
                   End If
               End If
           End If
       End With
   Next i

I debuged the code. I can not somtetimes access the property ProgId, and get
the error message. "No ProgID is available for this object."
Sometimes it is OK. sometimes it is error. Very strange. I accessed the
property ClassType, and I get the value "Excel.Chart.8".

Any idea?

Thanks advance,
Liu Jianzhong
Jean-Guy Marcil - 26 Nov 2007 21:09 GMT
ExcelReport was telling us:
ExcelReport nous racontait que :

> I have an Excel Chart object (Excel.Chart.8) in MS Word document. I'm
> trying to access the chart. But I sometimes get an error. The
[quoted text clipped - 24 lines]
>
> Any idea?

This probably means that the object the code is processing does not have a
ProgID... Why don't you use error trapping to bypass those objects?

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.