Private Sub CreateColumns (doc As WordDocument, Count As Int)
Me.As(JavaObject).RunMethod("createColumns", Array(doc.XWPFDocument, Count))
End Sub
#if Java
import org.openxmlformats.schemas.wordprocessingml.x2006.main.*;
import org.apache.poi.xwpf.usermodel.*;
import java.math.*;
public void createColumns(XWPFDocument document, int count) {
CTBody ctBody = document.getDocument().getBody();
CTSectPr ctSectPr = ctBody.getSectPr() == null ? ctBody.addNewSectPr() : ctBody.getSectPr();
for (int i = 0;i < count;i++) {
CTColumns col = ctSectPr.addNewCols();
col.setNum(BigInteger.valueOf(i + 1));
}
}
#End If