How to use Office from Visual Studio C#?

前端 未结 4 1032
栀梦
栀梦 2021-02-08 01:21

The technique for adding a reference to the COM interop of Office in Visual Studio is to go to:

  1. References
  2. Add Reference
  3. Select the COM
4条回答
  •  野性不改
    2021-02-08 02:10

    Wow that's a huge number of questions. I think that in general if your app is using the PIAs then you're assuming that your target audience has some version of Office installed. The PIAs will be installed in the GAC when the target user installs Office. If they don't have Office installed then why are you targeting Office?

    Yes, the Office dlls are the correct way to automate Office. There's a list of the assemblies here, including some for Office 2007.

提交回复
热议问题