Version

CreateRelationship Method (IPackage)

Creates a package-level relationship to a part with a given URI, target mode, relationship type, and identifier (ID).
Syntax
'Declaration
 
Function CreateRelationship( _
   ByVal targetUri As System.Uri, _
   ByVal targetMode As RelationshipTargetMode, _
   ByVal relationshipType As System.String, _
   ByVal id As System.String _
) As IPackageRelationship
IPackageRelationship CreateRelationship( 
   System.Uri targetUri,
   RelationshipTargetMode targetMode,
   System.string relationshipType,
   System.string id
)

Parameters

targetUri
The uniform resource identifier (URI) of the target part.
targetMode
Indicates if the target part is System.IO.Packaging.TargetMode.Internal or System.IO.Packaging.TargetMode.External to the package.
relationshipType
A URI that uniquely defines the role of the relationship.
id
A unique XML identifier.

Return Value

The package-level relationship to the specified part.
Requirements

Target Platforms: Windows 8.1, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

View on GitHub