Shapes.AddWebVideo (Word)
Adds a new web video to the document.
AddWebVideo (EmbedCode, VideoWidth, VideoHeight, PosterFrameImage, Url, Left, Top, Width, Height, Anchor)
Dim strEmbedCode As String: strEmbedCode =
Dim iVideoWidth As Integer: iVideoWidth =
Dim iVideoHeight As Integer: iVideoHeight =
Dim shpAddWebVideo As Shape
Set shpAddWebVideo = Selection.HeaderFooter.Shapes.AddWebVideo(EmbedCode:=strEmbedCode, VideoWidth:=iVideoWidth, VideoHeight:=iVideoHeight)
Arguments
The following arguments are required:
EmbedCode (String) - The HTML code to embed.
VideoWidth (Integer) - An integer that represents the width of the web video in pixels.
VideoHeight (Integer) - An integer that represents the height of the web video in pixels.
Optional arguments
The following arguments are optional
PosterFrameImage (String) - A string that points to the file to use as the poster frame for the web video.
Url (String) - A string that contains the URL to the web video.
Left (Long) - The position, measured in points, of the left edge of the poster frame from the edge of the document.
Top (Long) - The position, measured in points, of the top edge of the poster frame from the edge of the document.
Width (Long) - The width, measured in points, of the poster frame in the document.
Height (Long) - The height, measured in points, of the poster frame in the document.
Anchor (Range) - A Range object that represents the text to which the web video is bound. If Anchor is specified, the anchor is positioned at the beginning of the first paragraph in the anchoring range. If this argument is omitted, the anchoring range is selected automatically and the video is positioned relative to the top and left edges of the page.