You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicstaticWordParagraphCreateCustomBulletListItem(WordDocumentdocument,stringtext,stringtextColor,intfontSize){varparagraph=newParagraph();varnumberingProperties=newNumberingProperties(newNumberingLevelReference(){Val=0},newNumberingId(){Val=420});vartextRunProperties=newRunProperties(newColor(){Val=textColor},newRunFonts(){Ascii="Calibri",HighAnsi="Calibri"},newFontSize(){Val=(fontSize*2).ToString()}// OpenXML uses half-points);varparagraphProperties=newParagraphProperties(numberingProperties,newSpacingBetweenLines(){After="0",Line="240",LineRule=LineSpacingRuleValues.Auto});// spacing propertiesSpacingBetweenLinesspacingBetweenLines=newSpacingBetweenLines(){Before="0",// Spacing before (in twips, 1/20 pt)After="0",// Spacing after (in twips, 1/20 pt)Line="240",// Line spacing (240 twips = 12 points = single spacing)LineRule=LineSpacingRuleValues.Auto// Automatically adjust line spacing};paragraphProperties.Append(spacingBetweenLines);vartextRun=newRun(textRunProperties,newText(text));paragraph.Append(paragraphProperties,textRun);returndocument.AddParagraph(newWordParagraph(document,paragraph));}
creating the custom list
CustomHorizontalLine(document);document.AddParagraph(RegulerStyle(""));CreateCustomBulletListItem(document,"this is a test",fontColorStr,defaultFontSize);CreateCustomBulletListItem(document,"this is a test2",fontColorStr,defaultFontSize);CustomHorizontalLine(document);document.AddParagraph(RegulerStyle(""));
I started building something that would allow creating custom lists or loading ones, but I am not sure at the moment what is the state of it and whether it actually works
OfficeIMO version: 0.18.0
Hi, I'm trying to change the color of the bullet point
here's my code
a function to generate list
creating the custom list
the result is not quite satistying
How to get the default style like this ?
thanks in advance
The text was updated successfully, but these errors were encountered: