Share via


SlideMasterPart.AddMediaReferenceRelationship Method (MediaDataPart)

Adds a new MediaReferenceRelationship to the specified MediaDataPart.

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

Syntax

'Declaration
Public Function AddMediaReferenceRelationship ( _
    mediaDataPart As MediaDataPart _
) As MediaReferenceRelationship
'Usage
Dim instance As SlideMasterPart
Dim mediaDataPart As MediaDataPart
Dim returnValue As MediaReferenceRelationship

returnValue = instance.AddMediaReferenceRelationship(mediaDataPart)
public MediaReferenceRelationship AddMediaReferenceRelationship(
    MediaDataPart mediaDataPart
)

Parameters

Return Value

Type: DocumentFormat.OpenXml.Packaging.MediaReferenceRelationship
The new MediaReferenceRelationship.

Exceptions

Exception Condition
ArgumentNullException

Thrown when mediaDataPart is null reference.

InvalidOperationException

Thrown when the specified mediaDataPart is not in this document.

See Also

Reference

SlideMasterPart Class

SlideMasterPart Members

AddMediaReferenceRelationship Overload

DocumentFormat.OpenXml.Packaging Namespace