AnnSetUser method (Main Control)

Visual Basic example
Visual C++ 4.0 example

Syntax short AnnSetUser (OLE_HANDLE hObject, BSTR pOldUser, BSTR pNewUser, BOOL bSelected);

Overview:  Refer to Implementing Annotation Security.

Remarks

(Document/Medical only) Sets the user string for the specified object.

If the specified object does not have a specified user, set pOldUser to NULL and set pNewUser to the new user string.

To change an object’s user, set pOldUser to the old user string and set pNewUser to the new user string. For any object having a specified user, you must know the old user string in order to change the user.

You can change an object from having a specified user to having no user by setting pOldUser to the old user string and setting pNewUser to NULL.

Please note that when using bSelected to change the user on more than one object, only those objects with a user set to pOldUser will be changed. For example, if you set pOldUser to “YourObject” and set pNewUser to “MyObject”, and set bSelected to TRUE, only those objects having user “YourObject” will be changed. Objects with other users, or with NULL users will not be modified.

See Also

Elements:  AnnLock method, AnnLocked event, AnnUnlocked event, AnnUnlock method

Topics:  Annotations (Document/Medical only): Annotation Security