Share via


MobileItem.SMILBody Property (Outlook)

Returns or sets a String 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.

Version Information

Version Added: Outlook 2010

Syntax

expression .SMILBody

expression A variable that represents a MobileItem object.

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.

Example

The following Visual Basic for Applications (VBA) code example shows how to create an MMS MobileItem object by using the CreateItem method of the implicit Outlook Application object. The code example adds a text file attachment to the MobileItem object, and sets the PidTagAttachContentId 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

Concepts

MobileItem Object Members

MobileItem Object