Pattern: – when you wish to fill shape by the pattern, click pattern option to display a dialog box with predefined some pattern, select any pattern, you can change the colour of the pattern by using foreground and background dropdown button.
Texture: – If you choose a texture to appears some predefined texture. In the dialog box, you can select the option named one color, two colors, preset for modifying colour. Click on the “gradient” option to get a dialog box with predefined gradient colours.Ĭlick on any predefined gradient colour otherwise, click on the “more gradient” option to display another dialog box with many other options. Gradient: – Gradient is a combination colour effect. Next, the shape will have filled by image. Picture: – If you click picture option to get a dialog box, you have to select any picture from your computer drive. After selecting the shape, click format tab and click shape fill option. You can choose some other options to fill the shape. Read also:– Page setup in Word Other option to fill the shape with colour in word You can quickly insert a line into a Word document with the AutoFormat feature. In the right side of dialog box, you will see an equalizer for adjusting the tint of colour, you should see the preview on the new colour box. This article covers three ways to insert horizontal lines in Word for Microsoft 365, Word 2019, Word 2016, Word 2013, and Word 2010: AutoFormat, the Horizontal Line Tool, and the Shapes menu. Your selected colour displays in the dialog box on the new colour box. You have to click on the particular position of colour mat. Standard: – click standard to get some colour polygon, click any colour polygon to fill the colourĬustom: – Click the custom tab to appears a mixing colour mat. Click on any colour box to fill colour.Īfter using the colour If you have not satisfied, you can use another option named “More fill colors”.Ĭlick “More fill colors” option to display a dialog box, there are two tab buttons, named standard and custom. Click “shape fill” drop-down button to display a colour palette and other different optionĥ. A new tab will appear on the menu bar named Format, click on the format tab.Ĥ.
#Shapes to insert into word how to
You'll notice Word uses select and Selection a lot.Fill the shape with colour in Ms word- How to insert shape in Ms word Ms excel and Ms PowerPointĢ. Or you can get the position of the last paragraph absoluteY= ActiveDocument.Paragraphs().Range.Information(wdVerticalPositionRelativeToTextBoundary)Ī(50, absoluteY, 150, absoluteY).SelectĪnother note - if you're not sure how to perform something, open Word and record a macro of you doing it. So instead of using wdVerticalPositionRelativeToPage use wdVerticalPositionRelativeToTextBoundary, in the case of regular of normal text it will give you the absolute coordinate. Regarding your question, word inserts it exactly where you ask it - the function receives an absolute vertical coordinates and the coordinates you provide point to the first page.
#Shapes to insert into word code
Generating documents with OpenXML is not trivial, but it becomes much easier if you use the productivity tool - it lets you open any document and generates c# code that would recreate it. It'll work much faster and will not suffer from issues related with working with Word (like multithreading, files not closed properly or licensing). docx files, cosider using the OpenXML project. I have already tried to set the anchor parameter of the AddLine method but with bad results.įirst of all if all you need is generating. Now I want to ask how to make the shape be inserted at the correct page where the corresponding paragraph is. The calculated position value is correct but the shape will be inserted at the first page at this position. The paragraph oPara13 is on the second page of the document. Word.Shape line3 = (30, position, 800, position) Position = (float) (_Information () - 16.5 ) Word.Shape line2 = (30, position, 800, position) OPara2= (ref oRng) įloat position = (float) (_Information () - 16.5 ) Object oRng = _Item(ref oEndOfDoc).Range I use the following C#-code: //Add paragraph But if the paragraph is on another page the shape will also be inserted at the first page. Everything works when these paragraphs are on the first page of the document. I want to add the shapes after certain paragraphs. Therefore I use the ()-method in the namespace. Now I want to insert some shapes in the document. I have already created a new document and inserted some paragraphs. I want to create a MS Word 2010-file using C#.