Freigeben über


OpenXmlPartContainer.ChangeIdOfPart-Methode

Changes the relationship ID of the part.

Namespace:  DocumentFormat.OpenXml.Packaging
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Function ChangeIdOfPart ( _
    part As OpenXmlPart, _
    newRelationshipId As String _
) As String
'Usage
Dim instance As OpenXmlPartContainer
Dim part As OpenXmlPart
Dim newRelationshipId As String
Dim returnValue As String

returnValue = instance.ChangeIdOfPart(part, _
    newRelationshipId)
public string ChangeIdOfPart(
    OpenXmlPart part,
    string newRelationshipId
)

Parameter

  • newRelationshipId
    Typ: System.String
    The new relationship ID of the part.

Rückgabewert

Typ: System.String
The old relationship ID of the part.

Ausnahmen

Ausnahme Bedingung
ArgumentNullException

Throw when "part" is null reference or the newRelationshipId is null reference.

ArgumentOutOfRangeException

Thrown when the part does not exist under this part.

ArgumentException

Thrown when the specified relationship id is already used by another part.

Siehe auch

Referenz

OpenXmlPartContainer Klasse

OpenXmlPartContainer-Member

DocumentFormat.OpenXml.Packaging-Namespace