Forums     Knowledge Base     OfficeWriter Online     
 
 
This documentation is for
OfficeWriter v3.8.1
.NET Platform

View Docs for Another
Version or Platform

Programmer's Reference > WordApplication API > AbsolutePositioning

The AbsolutePositioning Object


This class is used to specify the position of tables and paragraphs in a Word document. Although the term "absolute" is used, the position is relative to some location in the document or page. Absolute positioning is set in twips. 1 twip = 1/20 pt = 1/1440 in.

You cannot create an AbsolutePositioning object using the new keyword. You must get it from a ParagraphFormatting or Table object using the AbsolutePositioning property.

The following sample gets the AbsolutePositioning object of the first table of a document.



Examples:

[csharp]
WordApplication app = new WordApplication();
Document doc = app.Open(@"C:\sample.doc");
Table firstTable = (Table) doc.Elements(Element.Type.Table)[0];
AbsolutePositioning ap = firstTable.AbsolutePositioning;
[vbnet]
Dim app As New WordApplication()
Dim doc As Document = app.Open("C:\sample.doc")
Dim firstTable As Table = CType(doc.Elements(Element.Type.Table)(0), Table)
Dim ap As AbsolutePositioning = firstTable.AbsolutePositioning


AbsolutePositioning Enumerations

NameDescription
AbsolutePositioning.HorizontalOrigin

An AbsolutePositioning.HorizontalOrigin value specifies the vertical origin of a table or paragraph position's y coordinate

AbsolutePositioning.VerticalOrigin

An AbsolutePositioning.VerticalOrigin value specifies the vertical origin of a table or paragraph position's y coordinate



AbsolutePositioning Properties

Property Type Access Description
Height int read
write

Sets or returns an int that represents the height in twips

HeightExact boolean read
write

Specifies whether the position's height is an exact height (true) or a minimum height (false)

OriginX AbsolutePositioning.HorizontalOrigin read
write

Returns the horizontal origin of the position's x coordinate

OriginY AbsolutePositioning.VerticalOrigin read
write

Sets or returns the vertical origin of the position's y coordinate

Width int read
write

Sets or returns an int that represents the absolute width in twips

X int read
write

Sets or returns an int that represents the x coordinate in twips

Y int read
write

Sets or returns an int that represents the position's y coordinate in twips



This object does not have any methods defined.



Copyright 2007 © SoftArtisans, Inc. All Rights Reserved.