View Full Version : send email without security warnings... vba... avoid uac??

2013-06-26, 01:34 AM
My company just replaced my XP pc and gave me a great win 7 with office 10... and now all my automation is failing. I'm working through it, but... previously I used express click yes for all my report sending after the updates, refreshes, etc., etc... The code included api functions... registerwindowMessage and so forth... now it just doesn't do anything... don't know where it fails, nothing, it just doesn't turn it on or off.
Anybody knows how to resolve this, pretty, pretty please????
the code is something like this... this is from a website, it mirrors my code pretty well..

' Declare Windows' API
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, _
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

Sub SomeProc()
Dim wnd As Long
Dim uClickYes As Long
Dim Res
As Long

' Register a message to
uClickYes =

Find ClickYes Window by classname
wnd = FindWindow("EXCLICKYES_WND",

' Send the message to Resume
Res = SendMessage(wnd, uClickYes, 1, 0)

' ...
' Do some Actions
' ...

' Send the message to Suspend ClickYes
Res =
SendMessage(wnd, uClickYes, 0, 0)

End Sub

2013-06-26, 01:16 PM
Have you gone from a 32 bit to a 64 bit box? I seem to remember some similar issue, and my problem was with something like this not being available on the new box:
RegisterWindowMessage _
Lib "user32" Alias "RegisterWindowMessageA"

But I can't remember the specifics.

You still having grief, or is it sorted now?