Share via


Shape.LockAnchor Property 

Determines if the specified Shape object's anchor is locked to the anchoring range.

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

Usage

Dim shape1 As Shape

Dim returnValue As Integer
returnValue = shape1.LockAnchor

Dim sampleValue As Integer
shape1.LockAnchor = sampleValue

Syntax

Property LockAnchor() As Integer
int LockAnchor {get; set;}
property Int32 LockAnchor{
    Int32 get();
    Void set(Int32);
}
public int get_LockAnchor();
public void set_LockAnchor(int);
function get LockAnchor() : int;
function set LockAnchor(int);

Remarks

This property returns true if the specified Shape object's anchor is locked to the anchoring range. When a shape has a locked anchor, you cannot move the shape's anchor by dragging it (the anchor doesn't move as the shape is moved).

A Shape object is anchored to a range of text, but you can position it anywhere on the page. The shape is anchored to the beginning of the first paragraph that contains the anchoring range. A shape will always remain on the same page as its anchor.

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

Shape Interface
Microsoft.Office.Interop.Word Namespace

Other Resources

Shape Members