Udostępnij za pośrednictwem


Document.GridOriginFromMargin Property (2007 System)

Gets or sets a value that indicates whether Microsoft Office Word starts the character grid from the upper-left corner of the page.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public Property GridOriginFromMargin As Boolean
'Usage
Dim instance As Document 
Dim value As Boolean 

value = instance.GridOriginFromMargin

instance.GridOriginFromMargin = value
[BrowsableAttribute(false)]
public bool GridOriginFromMargin { get; set; }
[BrowsableAttribute(false)]
public:
property bool GridOriginFromMargin {
    bool get ();
    void set (bool value);
}
public function get GridOriginFromMargin () : boolean 
public function set GridOriginFromMargin (value : boolean)

Property Value

Type: System.Boolean
true if Microsoft Office Word starts the character grid from the upper-left corner of the page; otherwise, false.

Remarks

When GridOriginFromMargin is false, GridOriginHorizontal and GridOriginVertical are used.

Examples

The following code example sets the horizontal and vertical point of origin for the grid, sets the horizontal and vertical distance between gridlines, and then enables the Snap objects to grid feature for the document.

This example is for a document-level customization.

Private Sub DocumentGridDistanceHorizontal()
    Me.GridOriginHorizontal = 80
    Me.GridOriginVertical = 90
    Me.GridDistanceHorizontal = 9
    Me.GridDistanceVertical = 9
    Me.SnapToGrid = True 
    Me.Application.Options.DisplayGridLines = True 
End Sub
private void DocumentGridDistanceHorizontal()
{
    this.GridOriginHorizontal = 80;
    this.GridOriginVertical = 90;
    this.GridDistanceHorizontal = 9;
    this.GridDistanceVertical = 9;
    this.SnapToGrid = true;
    this.Application.Options.DisplayGridLines = true;
}

.NET Framework Security

See Also

Reference

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace