AnnSetAutoText Example for Visual Basic

Note: Also works with Access 95 and 97.

Note: This topic is for Document/Medical only.

This example modifies the text string that is used for the undo option on the annotation pop-up menu.

'Please note the following:
'LEADRasterView1 refers to a LEADRasterView control
'Global declarations
Private WithEvents RasterAnn As LEADRasterAnnotation
Private RasterAnnToolbar As LEADRasterAnnToolBar

'In the Form_Load method:
Set RasterAnn = New LEADRasterAnnotation
Set RasterAnnToolbar = New LEADRasterAnnToolBar
RasterAnn.AnnParentRasterView = LEADRasterView1

Private Sub AnnSetAutoText_Click()
Dim TestText As String
RasterAnn.AnnGetAutoText ANN_AUTOTEXT_MENU_UNDO
TestText = RasterAnn.AnnAutoText
TestText = TestText + " - New"
RasterAnn.AnnSetAutoText ANN_AUTOTEXT_MENU_UNDO, TestText
End Sub