OpenXmlPartContainer.AddExternalRelationship Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddExternalRelationship(String, Uri) |
Adds an external relationship. Do not add hyperlink relationships through this method. Use AddHyperlinkRelationship() instead. |
AddExternalRelationship(String, Uri, String) |
Adds an external relationship. Do not add hyperlink relationships through this method. Use AddHyperlinkRelationship() instead. |
AddExternalRelationship(String, Uri)
Adds an external relationship. Do not add hyperlink relationships through this method. Use AddHyperlinkRelationship() instead.
public DocumentFormat.OpenXml.Packaging.ExternalRelationship AddExternalRelationship (string relationshipType, Uri externalUri);
member this.AddExternalRelationship : string * Uri -> DocumentFormat.OpenXml.Packaging.ExternalRelationship
Public Function AddExternalRelationship (relationshipType As String, externalUri As Uri) As ExternalRelationship
Parameters
- relationshipType
- String
The relationship type.
- externalUri
- Uri
The external URI.
Returns
An ExternalRelationship with the relationship ID.
Exceptions
Thrown when "relationshipType" or the "externalUri" is null reference.
Applies to
AddExternalRelationship(String, Uri, String)
Adds an external relationship. Do not add hyperlink relationships through this method. Use AddHyperlinkRelationship() instead.
public DocumentFormat.OpenXml.Packaging.ExternalRelationship AddExternalRelationship (string relationshipType, Uri externalUri, string id);
member this.AddExternalRelationship : string * Uri * string -> DocumentFormat.OpenXml.Packaging.ExternalRelationship
Public Function AddExternalRelationship (relationshipType As String, externalUri As Uri, id As String) As ExternalRelationship
Parameters
- relationshipType
- String
The relationship type.
- externalUri
- Uri
The external URI.
- id
- String
The desired relationship ID.
Returns
An ExternalRelationship with the relationship ID.
Exceptions
Thrown when "relationshipType" or the "externalUri" is null reference.
Thrown when the relationship type is hyperlink relationship type (http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink).
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應