I'd prefer to use C# and the generated code from document reflector shows this, but I need to do it in VB.net and can't figure it out. Can someone help me by converting this into VB please?
var element =
new SectionProperties(
new PageSize(){ Width = (UInt32Value)15840U, Height = (UInt32Value)12240U, Orient = PageOrientationValues.Landscape },
new PageMargin(){ Top = 1440, Right = (UInt32Value)1440U, Bottom = 1440, Left = (UInt32Value)1440U, Header = (UInt32Value)720U, Footer = (UInt32Value)720U, Gutter = (UInt32Value)0U },
new Columns(){ Space = (UInt32Value)720U },
new DocGrid(){ LinePitch = 360 }
){ RsidRPr = new HexBinaryValue() { Value = "00C6474E"}, RsidR = new HexBinaryValue() { Value = "000655B7"}, RsidSect = new HexBinaryValue() { Value = "000655B7"} };
return element;
Ok I figured out how to get it in there now just need to know how to set the properties for PageSize, PageMargin, Columns, DocGrid:
run.Append(text)paragraph.Append(run)body.Append(paragraph)body.Append(s)
***Heres the output**
Hi! pleasehelp
I came up with the same problem,trying to convert the C# codes to Vb.net .What's the syntax of (UInt32Value)15840U in Vb.net.Could u help me with it. thanks!
Sorry it took me so long to reply. Just remove the (UInt32Value) and the "U" after the integer. For instance Width = (UInt32Value)12240U converts to Width = 12240
Thanks! It seems 12240UI and 12240 equals.