

If you'd like to remove the evaluation message from the generated documents, or to get rid of the function limitations, please request a 30-day trial license for yourself.

Picture.TextWrappingStyle = TextWrappingStyle.Behindĭocument.SaveToFile("Insert.docx", FileFormat.Docx) 'Load an image and insert it to the documentĭim picture As DocPicture = section.Paragraphs(0).AppendPicture(Image.FromFile("C:\Users\Administrator\Desktop\pic.jpg")) Save the document to another file using Document.SaveToFile() method.Set the wrapping style of the image using DocPicture.TextWrappingType property.Set the height and width of the image using DocPicture.Width and DocPicture.Height properties.Set the horizontal and vertical position of the image using DocPicture.HorizontalPosition and DocPicture.VerticalPosition properties.Load an image and insert the image to the document using Paragraph.AppendPicture() method.Get a specified paragraph of the section using Section.Paragraphs property.Get the first section of the Word Document using Document.Sections property.Load a sample Word document using Document.LoadFromFile() method.NET allows you to insert an image at a specified location. The DocPicture.HorizontalPosition and DocPicture.VerticalPosition properties offered by Spire.Doc for. Instead of using the keyboard, here are three ways to insert different styles of horizontal lines in Microsoft Word. Insert an Image at a Specified Location in a Word document Pic2.TextWrappingStyle = TextWrappingStyle.Inlineĭocument.SaveToFile("InsertImage.docx", FileFormat.Docx) Pic1.TextWrappingStyle = TextWrappingStyle.Square

‘Set wrapping styles to Square and Inline respectively 'Insert images in the specified paragraphsĭim Pic1 As DocPicture = para1.AppendPicture(Image.FromFile("C:\Users\Administrator\Desktop\pic1.jpg"))ĭim Pic2 As DocPicture = para2.AppendPicture(Image.FromFile("C:\Users\Administrator\Desktop\pic2.png")) Private Shared Sub Main(ByVal args As String())ĭim document As Document = New Document()ĭim section As Section = document.Sections(0)ĭim para1 As Paragraph = section.Paragraphs(5)ĭim para2 As Paragraph = section.Paragraphs(9)
