'''' This code is part of Document Solutions for Word demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsGrapeCity.Documents.Word '' This demo shows how to add a link to a YouTube video that plays in the DOCX.PublicClassAddVideoLinkFunctionCreateDocx() AsGcWordDocumentDim doc = NewGcWordDocument() doc.Body.AddParagraph("The picture below includes a link to a YouTube video which plays inside the document if clicked.")'' Add picture with a thumbnail and a video link inside:Dim vStyle = doc.Styles.Add("vlink_style", doc.Styles(BuiltInStyleId.BlockText)) vStyle.ParagraphFormat.Indentation.LeftIndent = 0Dim par = doc.Body.AddParagraph() par.Style = vStyleDim pic = par.AddRun().AddPicture()Dim picBytes = File.ReadAllBytes(Path.Combine("Resources", "ImagesBis", "mescius-video-thumbnail.jpg")) pic.ImageData.SetImage(picBytes, "image/jpeg") pic.ImageData.WebVideoProperties.SetUrl("https://www.youtube.com/watch?v=RRTCt2TTOyU", "How to Build a Simple Balance Sheet using C# .NET Excel APIs", 400, 400) pic.Size.Width.Value = 400 pic.Size.Height.Value = 400'' doc.Body.AddParagraph("The End.")'' Done:Return docEndFunctionEndClass