Share via


Borders.Enable Property 

Returns or sets the border formatting for the specified object.

Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in microsoft.office.interop.word.dll)

Usage

Dim borders1 As Borders

Dim returnValue As Integer
returnValue = borders1.Enable

Dim sampleValue As Integer
borders1.Enable = sampleValue

Syntax

Property Enable() As Integer
int Enable {get; set;}
property Int32 Enable{
    Int32 get();
    Void set(Int32);
}
public int get_Enable();
public void set_Enable(int);
function get Enable() : int;
function set Enable(int);

Remarks

This property returns True or wdUndefined if border formatting is applied to all or part of the specified object. Can be set to True, False, or a WdLineStyle constant.

The Enable property applies to all borders for the specified object. True sets the line style to the default line style and sets the line width to the default line width. The default line style and line width can be set using the DefaultBorderLineWidth and DefaultBorderLineStyle properties.

To remove all the borders from an object, set the Enable property to False.

To remove or apply a single border, use Borders(index), where index is a WdBorderType constant, to return a single border, and then set the LineStyle property.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

See Also

Reference

Borders Interface
Microsoft.Office.Interop.Word Namespace

Other Resources

Borders Members