Generating this object
Method 1: via ObjectFactory
import org.docx4j.wml.CTShd;
public class Foo {
public CTShd createIt() {
org.docx4j.wml.ObjectFactory wmlObjectFactory = new org.docx4j.wml.ObjectFactory();
CTShd shd = wmlObjectFactory.createCTShd();
shd.setVal(org.docx4j.wml.STShd.CLEAR);
shd.setColor( "auto");
shd.setFill( "B8CCE4");
shd.setThemeFill(org.docx4j.wml.STThemeColor.ACCENT_1);
shd.setThemeFillTint( "66");
return shd;
}
}
Method 2
String openXML = "<w:shd w:color=\"auto\" w:fill=\"B8CCE4\" w:themeFill=\"accent1\" w:themeFillTint=\"66\" w:val=\"clear\"/ xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\">";
CTShd shd = (CTShd)XmlUtils.unmarshalString(openXML);
Users browsing this forum: Bing [Bot], Google [Bot] and 69 guests