![]() |
#1
|
|||
|
|||
![]()
Hi,
I had thought that I already submitted this but cannot find it. Forgive me if it is a dup. We have a Windows Desktop VB.Net app that invokes (via the Shell command) another VB.Net app several times. This app uses word to convert an RTF file to PDF then Outlook to email it. After the customer upgraded to Office 2016 from 2013 the program only does about 7 until it Gets and error 429 0x8008005 CO_E_SERVER_EXEC_FAILURE. The first 7 worked fine. The customer says that he sees the 7 WinWords in the task manager. They never seem to end. So is there a new limit on how many Words can be invoked? Why doesn't the WinWord task ever end? What can I do to fix it? |
#2
|
||||
|
||||
![]()
That suggests your VB.Net app that is called 'several times' fails to close the Word session(s) it starts. you would need to edit the code to ensure it does so.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Yes I think we are. Below is the code. There is no close method for wordApplication
Code:
Dim wordApplication As Word.Application Dim wordDocument As Word.Document Dim tempStoreText As String tempStoreText = Nothing wordApplication = New Word.Application wordDocument = wordApplication.Documents.Open(sRtfFilePath) wordApplication.Visible = False wordDocument.ExportAsFixedFormat(sPDF_FilePath, Word.WdExportFormat.wdExportFormatPDF, False) wordDocument.Close() wordDocument = Nothing wordApplication = Nothing |
#4
|
||||
|
||||
![]()
You should have:
wordApplication.Quit before: wordApplication = Nothing Pretty basic, really. I'd be surprised if the code you've been using wouldn't ultimately cause problems with Office 2013, too.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]()
Yes, I just was going to update the posting.
Thanks will give it a try. |
#6
|
|||
|
|||
![]()
But even that doesn't explain the reason for the 429 error. Only that it should close down word when each process it done. But if we start more than 7 processes it might still fail.
So any ideas about the magic number of around 7???? |
#7
|
||||
|
||||
![]()
The 429 error means your code can't create another Word instance. The behaviour you're seeing may be because Word 2016 uses more resources than Word 2013 did.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
![]()
wordApplication.quit did not seem to help.
|
#9
|
||||
|
||||
![]()
Did you insert:
wordApplication.Quit before: wordApplication = Nothing I'd be surprised if Word isn't the extra instances closing with that code. Did you check that they aren't proliferating in Windows Task Manager? If they still are, you might try: Code:
While Not wordApplication Is Nothing wordApplication.Quit Wend
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#10
|
|||
|
|||
![]()
Yes. Otherwise that would have triggered a error 91.
The user also says that there are multiple WinWords in the task manager just as a result of using Word. It always seems to fail on the 8th attempt. |
#11
|
||||
|
||||
![]()
That suggests they still haven't closed the orphaned instances left over from a previous process. Modifying the code won't do that. Furthermore, Word only opens one WinWord instance at a time. The user could kill the orphaned instances by logging off/on, or via 'End process' in the Task Manager.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Tags |
co_e_server_exec_failure |
|