{description} {excerpt}Converts centimeters to twips. A twip is 1/567 of a centimeter.{excerpt} {signature:C#} public int FromCentimeters(double cm) {signature}{signature:vb.net} Public Function FromCentimeters(ByVal cm As Double) As Integer {signature} {parameters} {param:cm}The number of centimeters to convert.{param} {returns}The result of the conversion \(twips\).{returns} {example}{code:csharp|title=C#} WordApplication wwApp = new WordApplication(); Document doc = wwApp.Create(); Section section = doc.CreateSectionAfter(); section.PageWidth = TwipsConverter.FromCentimeters(21.59); section.PageHeight = TwipsConverter.FromCentimeters(27.94); {code} {code:vb.net|title=vb.net} Dim wwApp As New WordApplication() Dim doc As Document = wwApp.Create() Dim section As Section= doc.CreateSectionAfter() section.PageWidth = TwipsConverter.FromCentimeters(21.59) section.PageHeight = TwipsConverter.FromCentimeters(27.94) {code} {example} |