Outlook Click Yes - Reference problem???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brad

    Outlook Click Yes - Reference problem???

    Hi all,

    I've been using the well document Click Yes program for auto sending
    emails for some time now and it has done it's job perfectly. In fact I
    have been so impressed with this that I've decided to add it into a
    central set of procedures that I use. However, after adding exactly
    the same code and references the code simply will not compile - it
    keeps erroring with Sub or Function not defined and highlighting
    'RegisterWindow Message' in the below code.

    Private Sub SomeProc(start As Boolean)
    Dim wnd As Long, uClickYes As Long, Res As Long

    ' Register a message to send
    uClickYes = RegisterWindowM essage("CLICKYE S_SUSPEND_RESUM E")

    ' Find ClickYes Window by classname
    wnd = FindWindow("EXC LICKYES_WND", 0&)

    If start = True Then
    ' Send the message to Resume ClickYes
    Res = SendMessage(wnd , uClickYes, 1, 0)
    Else
    ' Send the message to Suspend ClickYes
    Res = SendMessage(wnd , uClickYes, 0, 0)
    End If
    End Sub

    The references I've got added are these -
    Visual Basic for Applications
    Microsoft Access 8.0 Object Library
    Microsoft DAO 3.51 Object Library
    Microsoft ActiveX Data objects 2.5 Library
    Microsoft Outlook 9.0 Object Library
    Microsoft Excel 8.0 Object Library


    Can anyone suggest why this works in one database but not the other?
    They both call the sub with exactly the same command - Call
    SomeProc(True)

    Thanks in advance,

    Brad
Working...