Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
RPC server is unavailable from Excel 2003
I have an application that I wrote about five years ago that creates Excel spreadsheets based on an Excel template and data from VFP. This application was written with VFP6. I have had no problem with it until some of the users upgraded to Office 2003 on XP machines. Now they occasionally get the error "OLE error code 0x800706ba: The RPC server is unavailable."
The code is:
PUBLIC goExcel
goExcel = CREATEOBJECT("Excel.Application")
WITH goExcel
.Workbooks.OPEN("TEMPLATE.XLS"))
.Workbooks(1).ACTIVATE()
.VISIBLE = .T.
.DisplayFullScreen = .T.
ENDWITH
IF TYPE("goExcel") = "O" AND !ISNULL(goExcel)
oWS = goExcel.Sheets(1) && This is the line where the OLE error occurs
oWS.Cells(5,1).VALUE = "Company Name"
oWS.Cells(6,1).VALUE = "Company Address"
...
Does anyone know what causes this OLE error? Note: I have not had the error when the user is running Office 2000.
Thanks,
Pauline
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement