Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Description

Excerpt

Converts centimeters to twips. A twip is 1/567 of a centimeter.

Signature
C#
C#
 public int FromCentimeters(double cm)
Signature
vb.net
vb.net
Public Function FromCentimeters(ByVal cm As Double) As Integer
Parameters
Param
cm
cm

The number of centimeters to convert.

Returns

The result of the conversion (twips).

Example
Code Block
csharp
csharp
titleC#

          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 Block
vb.net
vb.net
titlevb.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)