ExternalApplication 介面
表示 Microsoft Office InfoPath 2007 應用程式。
**命名空間:**Microsoft.Office.Interop.InfoPath
**組件:**Microsoft.Office.Interop.InfoPath (於 microsoft.office.interop.infopath.dll 中)
語法
'宣告
<GuidAttribute("096CD69F-0786-11D1-95FA-0080C78EE3BB")> _
<CoClassAttribute(GetType(ExternalApplicationClass))> _
Public Interface ExternalApplication
Inherits _ExternalApplication
'用途
Dim instance As ExternalApplication
[GuidAttribute("096CD69F-0786-11D1-95FA-0080C78EE3BB")]
[CoClassAttribute(typeof(ExternalApplicationClass))]
public interface ExternalApplication : _ExternalApplication
備註
此類型為 coclass 的包裝函式,屬於 COM 互通性中 Managed 程式碼的必要項。使用此類型,即可存取由此 coclass 實作的 COM 介面成員。如需 COM 介面 (包括其成員說明連結) 的詳細資訊,請參閱 _ExternalApplication。
ExternalApplication 物件是一個有爭議的類型,不應該用於自動化。Application 物件及 XDocument 物件包含 InfoPath 應用程式外部自動化所需的屬性及方法。
基於向後相容性,ExternalApplication 物件可用於執行一組有限的 InfoPath 作業,如建立、開啟或關閉表單;註冊或取消註冊表單範本;或只是結束應用程式。
範例
在下列範例中,建立 ExternalApplication 物件並加以使用以開啟表單:
ExternalApplication infoPath = new ExternalApplicationClass();
// Open an InfoPath form.
infoPath.Open(@"C:\My Forms\Form1.xml", 1);
注意
上述範例假設您是使用 Microsoft.Office.Interop.InfoPath 命名空間,並參照「Microsoft InfoPath 2.0 型別程式庫」。
請參閱
參考
ExternalApplication 成員
Microsoft.Office.Interop.InfoPath 命名空間