View.Export 方法
將檢視匯出至具有指定格式的檔案。
**命名空間:**Microsoft.Office.Interop.InfoPath
**組件:**Microsoft.Office.Interop.InfoPath (於 microsoft.office.interop.infopath.dll 中)
語法
'宣告
<DispIdAttribute(9)> _
Sub Export ( _
<InAttribute> bstrURL As String, _
<InAttribute> bstrFormat As String _
)
'用途
Dim instance As View
Dim bstrURL As String
Dim bstrFormat As String
instance.Export(bstrURL, bstrFormat)
[DispIdAttribute(9)]
void Export (
[InAttribute] string bstrURL,
[InAttribute] string bstrFormat
)
參數
- bstrURL
匯出的檢視檔案將會寫入的目錄位置。
- bstrFormat
要匯出的檔案格式類型。僅支援 "MHT" 值。
備註
如果用於不是完全信任的表單中,Export 方法將會傳回「使用權限遭拒」錯誤。
範例
在下列範例中,ViewObject 物件的 Export 方法是用於匯出目前的檢視:
thisXDocument.View.Export(@"C:\MyView.mht", "MHT");