Partager via


_MobileItem.SMILBody Property

Returns or sets a String (string in C#) value in XML format that represents the Synchronized Multimedia Integration Language (SMIL) description of the content of a MobileItem object that is a Multimedia Messaging Service (MMS) message. Read/write.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

Syntax

'Declaration
<DispIdAttribute()> _
Property SMILBody As String
    Get
    Set
'Usage
Dim instance As _MobileItem
Dim value As String

value = instance.SMILBody

instance.SMILBody = value
[DispIdAttribute()]
string SMILBody { get; set; }

Property Value

Type: System.String

Remarks

The SMILBody property is used for attaching multimedia objects, such as images, video, and audio, to MMS MobileItem objects. Specify URLs to multimedia files in the Synchronized Multimedia Integration Language (SMIL) markup for the SMILBody property of the MMS message.

Examples

The following Visual Basic for Applications (VBA) code example shows how to create an MMS MobileItem object by using the CreateItem(OlItemType) method of the implicit Outlook Application object. The code example adds a text file attachment to the MobileItem object, and sets the PidTagAttachContentId Canonical Property property of the attachment. The example then initializes the SMILBody property, specifying an image file att1.jpg, and saves and displays the MobileItem object.

Sub CreateMobileItemMMS ()

    Dim myMobileItem As MobileItem
    Dim myAttachment, myAttachment1, myAttachment2 As Outlook.Attachment
    Set myMobileItem = CreateItem(olMobileItemMMS)
    Set myAttachment1 = myMobileItem.Attachments.Add(
        "C:\att0.txt", olByValue)
    ' Sets the PidTagAttachContentId property of the attachment.
    myAttachment1.PropertyAccessor.SetProperty 
        "https://schemas.microsoft.com/mapi/proptag/0x3712001F", "att0.txt"

    myMobileItem.SMILBody = "<?xml version=""1.0"" standalone=""yes""?>" & _
        "<smil><head><meta name=""author"" content=""MSOfficeOlkOMS""/>" & _
        "<layout><root-layout width=""128"" height=""128"" 
            background-color=""#000000""/>" & _
        "<region id=""Image"" left=""0%"" top=""0%"" width=""100%"" 
            height=""75%"" fit=""slice""/>" & _
        "<region id=""Text"" left=""0%"" top=""75%"" width=""100%"" 
            height=""25%"" fit=""slice""/>" & _
        "</layout></head><body><par dur=""invalid""><img src=""att1.jpg"" 
            region=""Image""/>" & _
        "<text src=""att0.txt"" region=""Text""/></par></body></smil>"

    myMobileItem.Save
    myMobileItem.Display
end sub

See Also

Reference

_MobileItem Interface

_MobileItem Members

Microsoft.Office.Interop.Outlook Namespace