RE: Insert Excel Chart into Word document fails intermittently



Once I isolated the problem code, here is the exception information:

The server threw an exception. (Exception from HRESULT: 0x80010105
(RPC_E_SERVERFAULT))


It's almost as if the server goes on break every so often, and is not
available.

Any thoughts??

Thanks,
John



"JOHNV" wrote:

Hi all,
I am using C# and Word Interop to insert a chart into a Word document. Most
of the time it works fine, but at odd intervals it will just not work. I
create the chart using C#, which always works, and save it into Windows
directory. Then, I copy the chart into an open Word document. Here's my
code:
oClassType = "Excel.Chart.8";
oFileName = "someFile.xls";

Word.Shape iShape = theRange.InlineShapes.AddOLEObject(
ref oClassType,
ref oFileName,
ref doc_missing,
ref doc_missing,
ref doc_missing,
ref doc_missing,
ref doc_missing,
ref doc_missing);


Maybe 10 times in succession, it works perfectly. Then one time, the file
will not be copied, and no object reference will be returned. iShape will
just be null, and there will be no exception thrown, as far as I can tell.

Does anyone have any ideas? Your thoughts would be most appreciated!

Thanks,
Johnv
.



Relevant Pages

  • Re: Autovivification by foreach
    ... FS> Can't use an undefined value as an ARRAY reference ... there is no exception anymore. ... undef and used where a ref should be. ... it seems to me that autovivification in this context is useful. ...
    (comp.lang.perl.misc)
  • Re: Trap Request Timed Out (80004005)
    ... This is not a .NET Framework exception, that's why it cannot be caught by the error handling code in the Global.asax file. ... It has a REF ... > .NET Software Developer ...
    (microsoft.public.dotnet.framework)
  • Re: "Value out of range" COM exception
    ... > object startPos = start; ... > object endPos = end; ... > doc.Range(ref start, ref end); ... > the last line gives me "Value out of range" exception if the endPos is ...
    (microsoft.public.office.developer.vba)
  • RE: COMException when editing range and HRESULT: 0x80010105
    ... ; // throws exception ... sure that the cell marker is not ... charUnit, ref count) represents. ...
    (microsoft.public.word.vba.general)
  • Re: Unable to play .wax file using wm10 or wm11
    ... The page that is invoking WMP, ... the old MMS protocol to either HTTP or RTSP/RTSPT/RTSPU protocol. ... You need to speak to your server manager and reconfigure Helix server ... <REF HREF = ...
    (microsoft.public.windowsmedia.player)

Loading