Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HRESULT: 0x800A03EC

Hi All,
I have a excel file and a word file in my wwwroot directory. Now I have
developed a asp.net page which
will get input fromo user and will create a copy of that excel/word with the
given input. Then, it will open the
copied excel and try to execute the macros. while opening
the excel for macro execution, we are getting an error
as follows
HRESULT: 0x800A03EC

My code works sometime and error occurs otherway.

Please let me know how to fix this issue and make things stable.

Other details
--------------
Windows Server 2003
MS office xp 2002 sp3
..Net 2.0
VS 2005

Below is our code
--------------------
Dim oExcel As New Excel.Application()
Dim oBooks As Excel.Workbooks, oBook As Excel.Workbook
Dim oWord As New Word.Application
Dim oDocs As Word.Documents, oDoc As Word.Document
Dim report As String
Try
oDocs = oWord.Documents
oWord.DisplayAlerts = Word.WdAlertLevel.wdAlertsNone
oDocs.Open(Server.MapPath(Request.ApplicationPath) &
"\re.doc")
oDoc = oDocs.Item(1)
oDoc.SaveAs(Server.MapPath(Request.ApplicationPath ) &
"\" & Request.Item("t_ibd") & ".doc")
oDoc.Close()
oExcel.Visible = False : oExcel.DisplayAlerts = False
'creating a copy of template
oBooks = oExcel.Workbooks
oBooks.Open(Server.MapPath(Request.ApplicationPath ) &
"\Retreat_template.xls") 'Load colorful template with chart
oBook = oBooks.Item(1)
oBook.SaveCopyAs(Server.MapPath(Request.Applicatio nPath)
& "\" & Request.Item("t_ibd") & ".xls")
oBook.Close()
'Starting the Excel macros
oBooks = oExcel.Workbooks
oBooks.Open(Server.MapPath(Request.ApplicationPath ) &
"\" & Request.Item("t_ibd") & ".xls")
oBook = oBooks.Item(1)
oExcel.Run("Macro7()")
oBook.Save()
oBook.Close()



Any help would be appreciated
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception from HRESULT: 0x800A03EC While opening Workbook Shreyash Excel Programming 0 February 7th 07 09:36 AM
HRESULT: 0x800A03EC exception when trying to hide a sheet. VVVVVK Excel Programming 1 August 25th 06 11:59 AM
Exception from HRESULT: 0x800A03EC nano2k New Users to Excel 0 July 21st 06 12:15 PM
HRESULT: 0x800A03EC setting DataSource for pivot tables. [email protected] Excel Programming 1 January 18th 06 08:59 AM
Chart.Export throws COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC. Steven Excel Programming 1 November 5th 03 06:59 PM


All times are GMT +1. The time now is 03:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"