NameSpace OpenSharedItem 方法(Outlook)NameSpace.OpenSharedItem method (Outlook)

會從指定的路徑或 URL,開啟共用項目。Opens a shared item from a specified path or URL.

語法Syntax

expressionexpression. OpenSharedItem( _Path_ )OpenSharedItem( _Path_ )

_運算式_會傳回 'NameSpace' 物件的運算式。expression An expression that returns a 'NameSpace' object.

參數Parameters

名稱Name 必要/選用Required/Optional 資料類型Data type 描述Description
PathPath 必要Required StringString 要開啟之共用項目的路徑或 URL。The path or URL of the shared item to be opened.

傳回值Return value

代表共用專案的適當 Outlook 專案的物件An Object representing the appropriate Outlook item for the shared item.

備註Remarks

這個方法可用來開啟 iCalendar 約會 (.ics) 檔案、vCard (.vcf) 檔案及 Outlook 郵件 (.msg) 檔案。This method is used to open iCalendar appointment (.ics) files, vCard (.vcf) files, and Outlook message (.msg) files. 此方法傳回的物件類型會根據開啟的共用項目類型而定,如下表所示。The type of object returned by this method depends on the type of shared item opened, as described in the following table.

| 共用專案類型| Outlook 專案| | iCalendar 約會(ics)檔案 |AppointmentItem| | vCard (.vcf)檔案 |ContactItem| |Outlook 郵件(.msg)檔案 |Type 會對應至儲存為 .msg 檔案之專案的類型 || Shared item type| Outlook item| |iCalendar appointment (.ics) file| AppointmentItem| |vCard (.vcf) file| ContactItem| |Outlook message (.msg) file|Type corresponds to the type of the item that was saved as the .msg file|

注意

這個方法不支援 iCalendar 行事曆 (.ics) 檔案。This method does not support iCalendar calendar (.ics) files. 若要開啟 iCalendar 行事曆檔案,您可以使用NameSpace物件的**OpenSharedFolder** 方法。To open iCalendar calendar files, you can use the OpenSharedFolder method of the NameSpace object.

另請參閱See also

NameSpace 物件NameSpace Object

支援和意見反應Support and feedback

有關於 Office VBA 或這份文件的問題或意見反應嗎?Have questions or feedback about Office VBA or this documentation? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.