document.getBackground().setType(BackgroundType.Color); document.getBackground().setColor(Color.lightGray); //保存结果文档 document.saveToFile("output/AddSolidColor.docx", FileFormat.Docx); } } 效果图: 2)添加渐变色背景色 importcom.spire.doc.*; importcom.spire.doc.documents.BackgroundType; imp...
doc.getBackground().setColor(Color.PINK); 2. 设置渐变背景 doc.getBackground().setType(BackgroundType.Gradient); doc.getBackground().getGradient().setColor1(Color.white); doc.getBackground().getGradient().setColor2(Color.green); 3. 设置图片背景 String img= "lye.png"; Document doc = ne...
To learn more about how to apply backgrounds like textures, see Add, change, or delete the background color in Word. Word.StyleType Represents the type of style. Word.TrackedChangeType TrackedChange type. Word.TrailingCharacter Represents the character inserted after the list item mark. Word....
wdDialogFormatDefineStyleBorders ApplyTo、Shadow、TopBorder、LeftBorder、BottomBorder、RightBorder、HorizBorder、VertBorder、TopColor、LeftColor、BottomColor、RightColor、HorizColor、VertColor、FromText、Shading、Foreground、Background、Tab、FineShading、TopStyle、LeftStyle、BottomStyle、RightStyle、HorizStyle、Vert...
leftBorder.color="red";//右边框rightBorder.val =ST_Border.dotted; rightBorder.color="red";//上边框topBorder.val =ST_Border.dotted; topBorder.color="red";//下边框bottomBorder.val =ST_Border.dotted; bottomBorder.color="red"; 设置表格中单元格竖直居中(单元格内容垂直居中) ...
Set font styles Create borders Add background colors Method 3: Mail Merge for Multiple Labels Mail merge is ideal for creating multiple unique labels from a data source like Excel. Data PreparationBefore starting the merge: Organize data in Excel ...
Word 2010 provides improved editing tools with a new set of Picture Tools that enable you to transform your documents into artistically engaging documents. New editing tools are as follows: Picture Correction Options Artistic Effect Options Background Removal ...
4. Under the "Personalize" section, choose the "Dark Mode Has A White Page Color" option. By selecting this, the page you write on will be white, while the background remains black, maintaining the dark mode aesthetic. “Microsoft Word on Mac options screenshot ” ...
Step 4.In the “Page Background” group, select “Page Border”. Step 5.Choose the border style you want (e.g., "Box" for a solid border). Step 6.Customize the border settings (color, width, etc.). Step 7.Specify whether it applies to "Header," "Footer," or "Both." ...
body{font-family:"Segoe UI Light","Segoe UI",Tahoma,sans-serif; }h1,h2{text-decoration-color:#4ec724; }input[type="submit"],input[type="button"]{height:24px;padding-left:1em;padding-right:1em;background-color:white;border:1pxsolid grey;border-color:#dedfe0#b9b9b9#b9b9b9#dedfe0;cu...