As such, these should be your default options. The best choice will depend on your needs, but Square and Tight work in most cases. This can be used to place a circle around some text or to add an arrow to highlight part of a passage. Places an image behind the text, allowing you to add a watermark or background image on a page (although MS Word has a separate watermark option, too, which is easier to use in many cases). Thank you for subscribing to our newsletter! Text wrapping through an image. Similar to Tight, but text will also fill any white gaps within the image. This is similar to Square but without the rectangular box, so text wraps around the edges of the image itself. This is most useful for larger images that occupy most of the width of a page. Text wraps above and below the image so it is on its own line. This is the most common form of text wrapping. This wraps text around an image on all sides at right angles, as if it had a rectangular box around it. The image will thus move as text is added or removed, whereas the other options here mean the image stays in one position while text shifts and ‘wraps’ around it. This option places an image on the same line as surrounding text. Your options for this in Microsoft Word are: In Line with Text Text wrapping refers to how images are positioned in relation to text in a document, allowing you to control how pictures and charts are presented. But how images fit with surrounding text is important when formatting a document, so you need to understand text wrapping. Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.From corporate logos in press releases to scientific diagrams in research papers, there are many reasons to include images in a Microsoft Word document. The RightMargin property is used to return and set the right margin setting. The LeftMargin property is used to return and set the left margin setting. The PageSetup object contains all the page setup attributes of a document (such as left margin, bottom margin, and paper size) as properties. The following example increases the left and right margins by 0.5 inch. The following example toggles bold formatting of the selected text. If the space-before value is anything other than 12, the SpaceBefore property is set to 12 points. The macro retrieves the current space before value, and if the value is 12 points, the space-before formatting is removed (the SpaceBefore property is set to zero). The following example toggles the space-before formatting of the first paragraph in the selection. Switching the space before a paragraph between 12 points and none Set rngFormat = ActiveDocument.Range(Start:=0, End:=0) The word "Title" is formatted with 24-point Arial font. The first paragraph is center-aligned and one half-inch space is added after the paragraph. The following example adds the word "Title" at the top of the current document. Inserting text and applying character and paragraph formatting
ParagraphFormat.Alignment = wdAlignParagraphJustify Start:=ActiveDocument.Paragraphs(1).Range.Start, _Įnd:=ActiveDocument.Paragraphs(3).Range.End) The Range is formatted by applying properties of the Font object and the ParagraphFormat object. The following example defines a Range object that refers to the first three paragraphs in the active document. Use the Font property to access character formatting properties and methods and the ParagraphFormat property to access paragraph formatting properties and methods. The following example uses the Selection property to apply character and paragraph formatting to the selected text.
This topic includes Visual Basic examples related to the tasks in the following sections.