

From the color palette under Fill, click the fill color you want for the shading.The Borders and Shading dialog box is displayed. On the Format menu, click Borders and Shading.Select the paragraphs, cells, graphics, or frames to which you want to add shading.In the Apply to box, click the item on which to apply the borders and shading formatting settings you have selected.įig: Borders and Shading dialog box showing border settingsĪdding Shading Using the Borders and Shading Dialog Box.To change individual border lines to a new style, color, or width, first click Custom, then click the Style, Color, and Width settings you want, and then click the border buttons in the Preview diagram to apply the new options.In the Width box, click the line width you want for the border.In the Color box, click the line color you want for the border.In the Style list, click a desired line for the border style you want.Under Setting, click any of Box, Shadow, or 3-D, if you want border line on all four sides of the selected item.Click the Borders tab to display the Borders options page.The Borders and Shading dialog box will be displayed. Select the paragraph(s), cells, graphics, etc, to which you want to add borders.The Borders and Shading dialog box enables you to select from a list of preset or custom borders and shading styles to add to selected text, paragraphs, etc.

If you select an item before clicking the Horizontal Line border type, the selected item will be overtyped (overwritten).
#Apply shaded style set in word code#
I try to see generated code with "Open XML SDK 2.5 Productivity Tool for Microsoft Office" to inspire me: var moduleDatacontext = new OpenXmlElementDataContext() I need to apply my style on this element.

SetContentOfContentControl(clonedElement, item.Value) Var clonedElement = CloneElementAndSetContentInPlaceholders(datacontext) Var datacontext = new OpenXmlElementDataContext()Įlement = openXmlElementDataContext.Element, I need to apply my custom style on ContentControls (Repeating Section).įor Recursive Placeholders, I use foreach (var item in list) I'm trying to generate Word documents using OpenXML SDK and Word Document Generator.
