你看了上面那两篇文章了吗?
在按其下载的文件的readme.htm文档里有以下表格:
These Office XP applications... ...depend on these Office XP PIAs.
Microsoft Access adodb.dll
dao.dll
Microsoft.Office.Interop.Access.dll
Microsoft.Office.Interop.Owc.dll
Microsoft.Vbe.Interop.dll
mscomctl.dll
msdatasrc.dll
office.dll
stdole.dll
Microsoft Excel Microsoft.Office.Interop.Excel.dll
Microsoft.Vbe.Interop.dll
office.dll
stdole.dll
Microsoft FrontPage Microsoft.Office.Interop.FrontPage.dll
Microsoft.Office.Interop.FrontPageEditor.dll
Microsoft.Vbe.Interop.dll
office.dll
stdole.dll
Microsoft Graph Microsoft.Office.Interop.Graph.dll
office.dll
stdole.dll
Microsoft Office XP Web Components adodb.dll
Microsoft.Office.Interop.Owc.dll
mscomctl.dll
msdatasrc.dll
stdole.dll
Microsoft Outlook® Microsoft.Office.Interop.Outlook.dll
Microsoft.Office.Interop.OutlookViewCtl.dll
office.dll
stdole.dll
Microsoft PowerPoint® Microsoft.Office.Interop.PowerPoint.dll
Microsoft.Vbe.Interop.dll
office.dll
stdole.dll
Microsoft Publisher Microsoft.Office.Interop.Publisher.dll
office.dll
stdole.dll
Microsoft Office XP smart tags Microsoft.Office.Interop.SmartTag.dll
stdole.dll
Microsoft Visio® Microsoft.Office.Interop.Visio.dll
stdole.dll
Microsoft Word Microsoft.Office.Interop.Word.dll
Microsoft.Vbe.Interop.dll
office.dll
stdole.dll
表明WORD需要引用Microsoft Word Microsoft.Office.Interop.Word.dll
Microsoft.Vbe.Interop.dll
office.dll
stdole.dll 这几个文件
另外,不是要你copy几个文件来判断,而是在获取用户的版本后,要调用不同的处理函数.如我写的:
try
{
Console.WriteLine("The Office Version is :"+Word_App.Version);