func (d *DocXml) Test() { document := word.NewDocument(d.Dir) d.Text1(document) docByte, err := xml.MarshalIndent(document, "", " ") if err != nil { fmt.Println("err:", err) } fmt.Println(xml.Header + string(docByte)) }
func (d *DocXml) Document() *word.Document { return word.NewDocument(d.Dir) }