Insert border word 20102/14/2023 ActiveDocument.Styles("My style name").Borders.Enable = False.Perhaps the simplest way to delete all borders from an object is to use. Is equivalent to Debug.Print ActiveDocument.Styles("MyParagraphStyle").Borders(wdBorderBottom).LineStyle wdLineStyleNone Setting several borders at once Using. So Debug.Print ActiveDocument.Styles("MyParagraphStyle").Borders(wdBorderBottom).Visible Visible property will reliably tell you whether a border is visible. The control freak in me can't cope with that, so I never use. I think that Word applies the border width from the current default border width (ie the width that shows when you display the Borders and Shading dialog), but always applies a black, wdLineStyleSingle border. Visible to True, Word applies a border, but the border style, width and colour that Word applies are at least partly random. Visible property does not have much to offer a developer. Visible property applies to an individual border, for example: ActiveDocument.Styles("MyParagraphStyle").Borders(wdBorderBottom).Visible = True If you choose a line width that is incompatible with your line style, you'll get an error. There does not appear to be any way to determine valid combinations of. You can see in the user interface that, for example, a wavy line is only available in 0.75pt or 1.5pt, and a double wavy line only available in 0.75pt. Not every line style is available in every width. So in general, set the properties in the order shown above. Therefore, if you want a border, you must set the. LineStyle is wdLineStyleNone, then you can't set the. With some exceptions due to what I consider to be bugs, you can control a single border using its three three main properties: Setting the LineStyle, LineWidth and Color for each border a table cell has 8 (4 outside borders, vertical and horizontal plus two diagonals).a paragraph has 5 (top, right, bottom, left plus horizontal). a Font object has 1 border (in the user interface this is described as a border on the "Text").But not all objects have the same number of borders. Lots of objects in the Word object model have borders. Setting individual borders How many borders? This page seeks to describe my experience with setting and controlling borders in styles. Microsoft's documentation of borders in styles in the VBA help files is poor.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |