AnnAutomation Property example for Visual Basic

Note: Also works with Access 95 and 97.

Note: This topic is for Document/Medical only.

This example shows how you can use the AnnAutomation property to access the automation object through DLL functions.

Dim IsBold As Long ' Is the object’s text bold
Dim hAnnObject As Long

hAnnObject = Lead1.AnnAutomation

' Set the default font to bold, unless it already is
L_AnnGetFontBold hAnnObject, IsBold
If IsBold <> 0 Then
    MsgBox "Already bold", 0, "Notice"
Else
    L_AnnSetFontBold hAnnObject, True, 0
End If