General information
Category:
COM/DCOM and OLE Automation
Title:
Excel printing C0000005 error
I'm using excel automation to create reports from my system, these are run off 3 at a time 2 of which have a copy graphic over them, I'm getting occasional and seemingly random C0000005 error, it says it's line 0 of the current method but by having it output progress lines to a log I've worked out it's actually something to do with printing.
here's the bit it's tracked to.
oworkbook.activesheet.Shapes(8).visible = .F. && turn off copy graphic
oworkbook.activesheet.Shapes(7).visible = .F.
oworkbook.activesheet.Shapes(6).visible = .F.
oworkbook.activesheet.Shapes(5).visible = .F.
fputs(as_plog,alltrim(thisjobid) + " " + "PRINT 1.1")
oworkbook.activesheet.printout(1,,1) &&<<<-- GENERALLY CRASHES HERE
fputs(as_plog,alltrim(thisjobid) + " " + "PRINT 1.2")
oworkbook.activesheet.Shapes(8).visible = .T. && turn on copy graphic
oworkbook.activesheet.Shapes(7).visible = .T.
oworkbook.activesheet.Shapes(6).visible = .T.
oworkbook.activesheet.Shapes(5).visible = .T.
oworkbook.activesheet.printout(1,,2)
this does only happen occasionaly but since the system is supposed to run overnight causes big issues, I'm using office 2000, have considered updating/upgrading that but then I'll need to work out getting around the outlook security problem (program trying to send email dialog) if this is the way then on to my next question.... see next post :)
Ken.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only