What is HRESULT: 0x800A03EC

M

miztaken

Hi,

I am doing Office Automation.
When i opened an excel file inside DOC or PPT and tried to save it
i.e. Document.SaveAs()
then i get this error.
Exception from HRESULT: 0x800A03EC

To my surprise this error is not consistent...it is totally
unpredictable and i dont know what is causing it?

Please shade some of your views and remedies about this error?


Thank You
miztaken
 
J

Jim Rech

I'm don't know what that error code means either but if you're automating
Excel inside another application you have to use the Excel object model, not
the host's. So the object in this case has to be a workbook, for example:

xlApp.ActiveWorkbook.SaveAs "abc.xls"

or

xlWB.SaveAs "abc.xls"

where xlWB has been set to a workbook already.

If you want to save a workbook with its current name, something like:

xlWB.Save
--
Jim
| Hi,
|
| I am doing Office Automation.
| When i opened an excel file inside DOC or PPT and tried to save it
| i.e. Document.SaveAs()
| then i get this error.
| Exception from HRESULT: 0x800A03EC
|
| To my surprise this error is not consistent...it is totally
| unpredictable and i dont know what is causing it?
|
| Please shade some of your views and remedies about this error?
|
|
| Thank You
| miztaken
 
M

miztaken

Hi Jim,
Thank you for the reply.
Actually i was trying to save excel file inside DOC file.
I am doing like this:-

//get shape from word file
MsWord.OLEFormat format = shape.OLEFormat;
format.Activate();
MsExcel.Workbook innerbook = shape.OLEFormat.Object;
innerbook.SaveAs(SavePath, nullobj, nullobj, nullobj, nullobj,
nullobj, XlSaveAsAccessMode.xlNoChange, nullobj, nullobj, nullobj,
nullobj, nullobj);

I hope i am doing this correctly.
Now the problem is:
When i run the standalone application dealing with Office Files only
then it runs well.
But when i do other Outlook operations as well then i get this error.

I think there must be some connection of that Error with Outlook
processing.

Please let me know your views on this

Thank You
miztaken
 
J

Jim Rech

I wish I could help but I don't know C# or .Net. My answer assumed you were
using VB.

--
Jim
| Hi Jim,
| Thank you for the reply.
| Actually i was trying to save excel file inside DOC file.
| I am doing like this:-
|
| //get shape from word file
| MsWord.OLEFormat format = shape.OLEFormat;
| format.Activate();
| MsExcel.Workbook innerbook = shape.OLEFormat.Object;
| innerbook.SaveAs(SavePath, nullobj, nullobj, nullobj, nullobj,
| nullobj, XlSaveAsAccessMode.xlNoChange, nullobj, nullobj, nullobj,
| nullobj, nullobj);
|
| I hope i am doing this correctly.
| Now the problem is:
| When i run the standalone application dealing with Office Files only
| then it runs well.
| But when i do other Outlook operations as well then i get this error.
|
| I think there must be some connection of that Error with Outlook
| processing.
|
| Please let me know your views on this
|
| Thank You
| miztaken
|
|
|
 

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