jwcolby
jwcolby at colbyconsulting.com
Wed May 11 12:28:17 CDT 2011
I know about ClickYes and might use that, however the free version does not support anything past Access 2003. John W. Colby www.ColbyConsulting.com On 5/11/2011 11:46 AM, Dan Waters wrote: > Hi John, > > This is a VBA module to automatically push the ClickYes button - I have not > used this. Might have some useful content. Came from: > http://www.contextmagic.com/express-clickyes/ > > '---------------------------- > Option Compare Database > Option Explicit > > '-- Declare Windows' API functions > Private Declare Function RegisterWindowMessage Lib "User32" Alias > "RegisterWindowMessageA" (ByVal lpString As String) As Long > Private Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal > lpClassName As Any, ByVal lpWindowName As Any) As Long > Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" > (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As > Any) As Long > > Public Function pfSendUsingObject() > > Dim blnPreview As Boolean > > '-- If you do want to preview then you do not need the ClickYes stuff. _ > but if you don't want to preview and you just want to send it > without being informed that _ > it is being sent, then use the ClickYes stuff. > > blnPreview = False > > If blnPreview Then > DoCmd.SendObject acSendNoObject, , , "max.wanadoo at gmail.com", , , > "Subject", "Text Body", blnPreview > Else > Call fStartClickYes(True) > DoCmd.SendObject acSendNoObject, , , "max.wanadoo at gmail.com", , , > "Subject", "Text Body", blnPreview > Call fStartClickYes(False) > End If > > End Function > > Public Function fStartClickYes(bStart As Boolean) > > '-- Here is some vba code that starts and stops clickyes in the systray > ' download from here and install. The A2k7 version is not free. _ > http://www.contextmagic.com/express-clickyes/ > > Dim lngWnd As Long > Dim lngClickYes As Long > Dim lngResume As Long > > '-- Register a message to send > lngClickYes = RegisterWindowMessage("CLICKYES_SUSPEND_RESUME") > > '-- Find ClickYes Window by classname > lngWnd = FindWindow("EXCLICKYES_WND", 0&) > > If bStart Then > '-- Send the message to Resume ClickYes > lngResume = SendMessage(lngWnd, lngClickYes, 1, 0) > Else > ' Send the message to Suspend ClickYes > lngResume = SendMessage(lngWnd, lngClickYes, 0, 0) > End If > > End Function > > '---------------------------- > > -----Original Message----- > From: dba-vb-bounces at databaseadvisors.com > [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Wednesday, May 11, 2011 9:58 AM > To: VBA > Subject: [dba-VB] C# Outlook Automation > > Has anyone found C# code to emulate the ClickYes program? I found something > in VB5/6 for building a program that sits in the toolbar but it seems that > if you can do that, then you could just as easily look for the pop-up right > in your own code and click the yes button. > > Just thought I'd check here before re-inventing the wheel. > > -- > John W. Colby > www.ColbyConsulting.com > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > > > > _______________________________________________ > dba-VB mailing list > dba-VB at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-vb > http://www.databaseadvisors.com > >