clear clipboard via macro

Is it possible to clear the clipboard using a macro command in Acc97? If so, how?
Thanks
ingvarAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
BrianWrenConnect With a Mentor Commented:
------------------------------------------------------------------------------

Put the folowing into a module:

Option Compare Database
Option Explicit

Private Declare Function _
          apiEmptyClipboard Lib "user32" _
          Alias "EmptyClipboard" () As Long

Private Declare Function _
          apiOpenClipboard Lib "user32" _
          Alias "OpenClipboard" _
          (ByVal hwnd As Long) As Long
 
Private Declare Function _
         apiCloseClipboard Lib "user32" _
         Alias "CloseClipboard" () As Long
 
Public Function EmptyClp() As Boolean

    Call apiOpenClipboard(Application.hWndAccessApp)
   
    Call apiEmptyClipboard
   
    Call apiCloseClipboard

End Function

Then in you macro put the RunCode action, with EmptyClp() as the function name to run.

Brian
0
All Courses

From novice to tech pro — start learning today.