CurrObj Property

[Top]  [Chapter]  [Previous]  [Next]


IWPTextObj CurrObj;


This is the interface to the object interface of the current object. The current object is the object which has been inserted last. Since the mail merge facility also uses text objects, you can also use CurrObj to manipulate fields created by InputField


This C# code inserts a horizontal line and then changes it's color to red.



IWPTextObj obj = wpdllInt1.CurrObj;


 obj.IntParam = wpdllInt1.ToRGB(Color.Red);



This VB code inserts a field and then makes it "editable"


Dim Cursor As IWPTextCursor

Dim Field As IWPTextObj

Set Cursor = WPDLLInt1.Memo.TextCursor

Set Field = WPDLLInt1.Memo.CurrObj


Cursor.InputText "Some text"

Cursor.InputField "FieldName", "Display Text", False

Field.Mode = 2 ' Make it Editable!

Cursor.InputText "Some more text"


'Switch to edit mode

WPDLLInt1.Memo.FormCompletion = True

[idh_iwpmemo_currobj.htm]    Copyright © 2007 by WPCubed GmbH