Posts: 863
Threads: 197
Joined: Apr 2005
I tried
Macro
Macro5
typelib Outlook {00062FFF-0000-0000-C000-000000000046} 9.0
Outlook.Application a._getactive
Outlook.MailItem aa=a.CreateItem(Outlook.olMailItem)
aa.To="Doe, John"
aa.Subject="test"
aa.Send
but a message of security appears.
Is there any way of do it automatically?
Posts: 12,140
Threads: 142
Joined: Dec 2002
To close securiy message, before sending launch another thread (mac) that waits for the message and closes it.
Posts: 863
Threads: 197
Joined: Apr 2005
I tried
Function
close
Trigger
!ca"Microsoft Outlook" "#32770"
int hwnd=val(_command)
wait 0 WE id(4774 win("Microsoft Outlook" "#32770"))
but id(4774 hwnd)
but it doesn't work.
Posts: 863
Threads: 197
Joined: Apr 2005
Posts: 12,140
Threads: 142
Joined: Dec 2002
lef also does not work? I used it in System function MailCWM.
Posts: 863
Threads: 197
Joined: Apr 2005
with lef:
Error (RT) in Macro5: 0xA0E04005, ----> aa.Send
(but I try run the function in lock computer)
Posts: 12,140
Threads: 142
Joined: Dec 2002
When computer locked, QM will not close the message.
Posts: 863
Threads: 197
Joined: Apr 2005
Do you know another way to send mail in MS Outlook when the computer is locked?
Posts: 12,140
Threads: 142
Joined: Dec 2002
No. Why need to send using Outlook? Maybe you can get data from Outlook and send it using SendMail.
Posts: 863
Threads: 197
Joined: Apr 2005
MS Outlook is the program used where I work.
Posts: 863
Threads: 197
Joined: Apr 2005
I found
http://www.dimastr.com/redemption/
Can you help me to use it in QM?
Posts: 12,140
Threads: 142
Joined: Dec 2002
Look in QM help, "Using COM components" topic.
Does it not work when you use standard COM component code, like this?
typelib ...
SomeClass var._create
var.SomeFunction(...)
Posts: 863
Threads: 197
Joined: Apr 2005
I tried to convert
dim SafeItem, oItem
set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an instance of Redemption.SafeMailItem
set oItem = Application.CreateItem(0) 'Create a new message
SafeItem.Item = oItem 'set Item property
SafeItem.Recipients.Add "
[email protected]"
SafeItem.Recipients.ResolveAll
SafeItem.Subject = "Testing Redemption"
SafeItem.Send
without success.
Posts: 12,140
Threads: 142
Joined: Dec 2002
not tested
Macro
Macro630
typelib Outlook {00062FFF-0000-0000-C000-000000000046} 9.0
Outlook.Application a._getactive
IDispatch SafeItem, oItem
SafeItem._create("Redemption.SafeMailItem")
oItem=a.CreateItem(0)
Posts: 863
Threads: 197
Joined: Apr 2005
Posts: 863
Threads: 197
Joined: Apr 2005
This code is easier and also works.
Macro
Macro10
typelib Outlook {00062FFF-0000-0000-C000-000000000046} 9.0
Outlook.Application a._getactive
Outlook.MailItem aa=a.CreateItem(Outlook.olMailItem)
aa.To="Doe, John"
aa.Subject="test"
aa.Body="This is a test"
aa.Save
IDispatch SafeItem
SafeItem._create("Redemption.SafeMailItem")
SafeItem.Item = aa
SafeItem.Recipients.ResolveAll
SafeItem.Send
but I continue thinking, that type of protection will have the window ("a program is trying to automatically send e-mail...) so that (SendClickMessage, SendKey) in Yes button don't work.
Do you know another way?
Posts: 12,140
Threads: 142
Joined: Dec 2002
another way to click Yes without using mouse? No. The dialog uses some nonstandard input method for Yes button, maybe uses mouse hook.
Posts: 863
Threads: 197
Joined: Apr 2005
Quote:The dialog uses some nonstandard input method for Yes button, maybe uses mouse hook
Could you show me a example to try if works?
Posts: 12,140
Threads: 142
Joined: Dec 2002