send email without security warnings... vba... avoid uac??

SoyJet

New member
Joined
Jun 25, 2013
Messages
1
Reaction score
0
Points
0
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
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

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

' Register a message to
send
uClickYes =
RegisterWindowMessage("CLICKYES_SUSPEND_RESUME")

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

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

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

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

End Sub
 
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?
 
Back
Top