1

I inherited a custom application that was built using Visual Studio 2003 and .NET 2.0. It uses Microsoft Office PIA version 11 (for Office 2003), and it originally ran on Windows XP. The application relies on reading Excel, Word, and Powerpoint files, as well as Outlook for reading .PST files.

Now I am trying to get this application to work on a 64-bit, Windows 7 machine that has Office 2010. For the most part, the application works--it correctly reads the .PST files and uploads emails and attachments (along with correct metadata) to a Sharepoint. It's just that after I close the application and try to open Microsoft Office 2010 products (Word, Excel, Powerpoint, Outlook), these programs tend to crash. The error message would say "Microsoft __ has stopped working."

Looking at event viewer, the logs usually look like this:

Faulting application name: OUTLOOK.EXE, version: 14.0.6109.5005, time stamp: 0x4e79b881
Faulting module name: ntdll.dll, version: 6.1.7601.17514, time stamp: 0x4ce7ba58
Exception code: 0xc0000005
Fault offset: 0x0002e3fb
Faulting process id: 0x1b20
Faulting application start time: 0x01cd5631d6ed41d9
Faulting application path: C:\Program Files (x86)\Microsoft Office\Office14\OUTLOOK.EXE
Faulting module path: C:\WINDOWS\SysWOW64\ntdll.dll
Report Id: 2f11010e-c226-11e1-8b8d-9cb70de93ccf

After doing lots of browsing, I am guessing that it has to do with the application referencing PIA version 11 for Office 2003, and the version that I have on this computer is PIA version 14 for Office 2010. Also, I am 100% sure that it's this application that is causing Office 2010 applications to crash since it happens every time I run that legacy application. Restarting the computer fixes these crashes but I would rather not have to restart every time I run this application!

Short of actually updating the source code, is there anything I can do to fix this problem?

EDIT: I now have access to Visual Studio Express 2010 (C#) and I have source code files from using Reflector. So I guess I can start making code changes. I am still getting a lot of errors though, see my responses below...

4

3 回答 3

3

听起来遗留应用程序仍然持有两个共享组件,从而导致后续程序崩溃。

如果您无法更改旧版应用程序,那么您将无能为力。像上面的评论建议的那样调试它是一个好方法。但实际上,您需要能够更改应用程序。

你能得到源代码吗?或者这不是供应商“交付”的一部分?

于 2012-06-30T12:46:01.520 回答
2

我在使用 VB.Net 2012、Interop.Excel for MSO 14.0 和 Windows 7、64 位时遇到了类似的问题。我能够通过目标 .Net 4.0 而不是 4.5 和 64 位 cpu 来消除这个问题。

于 2012-11-09T19:48:55.360 回答
0

我尝试删除对旧 Microsoft Office PIA 版本 11(适用于 Office 2003)的引用,并添加对当前 PIA 版本 14(适用于 Office 2010)的新引用。我还将目标 .NET 更改为 .NET 4 ...我现在在构建包时遇到了很多奇怪的代码错误。

主文件将有

using System;
using Microsoft.Office.Interop.Excel;
using Microsoft.Office.Interop.Outlook;
using Microsoft.Office.Interop.PowerPoint;
using Microsoft.Office.Interop.Word;

但是当我尝试构建项目时,我会得到所有这些错误,说

Microsoft.Office.Interop.Word.System does not contain a definition for 'IO'

The type name 'Drawing' does not exist in the type 'Microsoft.Office.Interop.Word.System'

不知道为什么 Visual Studio 不读取“系统”命名空间。看起来 Word 命名空间正在覆盖 System 命名空间?当我删除“使用 Microsoft.Office.Interop.Word”命名空间时,所有构建错误都会消失(显然,实际使用 Word 的对象或方法除外)

于 2012-07-12T16:28:36.987 回答