設定電腦以開發 Office 方案Configure a computer to develop Office solutions

若要為 Microsoft Office 建立 VSTO 增益集和自訂,請安裝支援的 Visual Studio、.NET Framework 和 Microsoft Office 版本。To create VSTO Add-ins and customizations for Microsoft Office, install a supported version of Visual Studio, the .NET Framework, and Microsoft Office.

軟體Software 支援的版本Supported versions
Visual Studio 2017Visual Studio 2017 具有 Office/SharePoint 開發 工作負載的任何版本。Any edition with the Office/SharePoint development workload.
.NET Framework.NET Framework -.NET Framework 4 或更新版本。- The .NET Framework 4 or later.
Microsoft OfficeMicrosoft Office
  • 任何套件版本的 Office,包括適用于企業的 Microsoft 365 應用程式。Any suite edition of Office including Microsoft 365 apps for enterprise.
  • 下列任何一種獨立應用程式:Any of the following standalone applications:

    • ExcelExcel
    • InfoPath (僅限 Office 2013 和 Office 2010)InfoPath (Office 2013 and Office 2010 only)
    • OutlookOutlook
    • PowerPointPowerPoint
    • ProjectProject
    • VisioVisio
    • WordWord

必須在安裝 Office 時安裝 Visual Basic for Applications (VBA)。Visual Basic for Applications (VBA) must be installed as part of Office. 重要事項: 不支援隨用隨之 Office 2010 應用程式的執行階段版本。Important: Click-to-Run versions of Office 2010 applications are not supported.

如需詳細的安裝步驟,請參閱 如何:設定電腦以開發 Office 方案For detailed installation steps, see How to: Configure a computer to develop Office solutions.

如果專案範本未出現或無法在 Visual Studio 中運作If project templates don't appear or they don't work in Visual Studio

如果您安裝受支援版本的 Visual Studio、.NET Framework 和 Microsoft Office,但 Office 專案範本不會出現在 Visual Studio [ 新增專案 ] 對話方塊中,或者在您嘗試使用時收到錯誤,請檢查下列各項:If you install a supported version of Visual Studio, the .NET Framework, and Microsoft Office, but Office project templates either don't appear in the Visual Studio New Project dialog box, or you receive an error when you try to use one, check the following:

  • 確定電腦上已安裝 Microsoft Office 開發人員工具。Ensure that you have the Microsoft Office developer tools installed on your computer.

    Office developer tools 是 Visual Studio 的選用元件,但會隨 Visual Studio 自動安裝。Office developer tools are an optional component of Visual Studio, but they are installed automatically along with Visual Studio. 如果您透過指定要安裝的功能來自訂 Visual Studio 安裝,請確定已在安裝期間選擇 [Microsoft Office Developer Tools] ,以安裝這些工具。If you customize the Visual Studio installation by specifying which features to install, make sure that you choose Microsoft Office Developer Tools during setup to install the tools.

    若要確認已安裝這些工具,請啟動 Visual Studio 安裝程式,然後選擇 [ 修改 ] 按鈕。To make sure that these tools are installed, start the Visual Studio setup program, and choose the Modify button. 選取 [Microsoft Office Developer Tools] 核取方塊,然後選擇 [更新] 按鈕。Select the Microsoft Office Developer Tools check box, and then choose the Update button.

  • 確定您不是執行隨用隨的 Office 版本,而是由隨用隨之執行。Make sure that you're not running a version of Office that was delivered by Click-to-Run. 請參閱 如何:確認 Outlook 是否為電腦上的隨時執行應用程式See How to: Verify whether Outlook is a Click-to-Run application on a computer.

  • 確定您只執行一個版本的 Microsoft Office。Ensure that you're running only one version of Microsoft Office.

如果您持續遇到問題,請參閱 Office 方案中錯誤的其他支援If you continue to experience problems, see Additional support for errors in Office solutions.

另請參閱See also