OpenXmlPartContainer.CreateRelationshipToPart 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
CreateRelationshipToPart(OpenXmlPart) |
Adds a relationship for the specified part to this part. |
CreateRelationshipToPart(OpenXmlPart, String) |
Adds a relationship for the specified part to this part. |
CreateRelationshipToPart(OpenXmlPart)
Adds a relationship for the specified part to this part.
public string CreateRelationshipToPart (DocumentFormat.OpenXml.Packaging.OpenXmlPart targetPart);
member this.CreateRelationshipToPart : DocumentFormat.OpenXml.Packaging.OpenXmlPart -> string
Public Function CreateRelationshipToPart (targetPart As OpenXmlPart) As String
Parameters
- targetPart
- OpenXmlPart
The part to add relationship for.
Returns
A unique relationship identifier.
Exceptions
Thrown when "part" or the "id" is null reference.
Thrown when the part is no allowed to be added.
Thrown when one instance of same type part already exists and multiple instance of that type is not allowed.
Thrown when the targetPart
and this part are not in the same OpenXmlPackage.
Applies to
CreateRelationshipToPart(OpenXmlPart, String)
Adds a relationship for the specified part to this part.
public string CreateRelationshipToPart (DocumentFormat.OpenXml.Packaging.OpenXmlPart targetPart, string id);
member this.CreateRelationshipToPart : DocumentFormat.OpenXml.Packaging.OpenXmlPart * string -> string
Public Function CreateRelationshipToPart (targetPart As OpenXmlPart, id As String) As String
Parameters
- targetPart
- OpenXmlPart
The part to add a relationship for.
- id
- String
A unique relationship identifier.
Returns
A unique relationship identifier.
Exceptions
Thrown when "part" or the "id" is null reference.
Thrown when the part is no allowed to be added.
Thrown when one instance of same type part already exists and multiple instance of that type is not allowed.
Thrown when the targetPart
and this part are not in the same OpenXmlPackage.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應