|
-
Nov 24th, 2010, 11:47 AM
#1
Thread Starter
Junior Member
Problem with email (Outlook)
Hi, I am tryin to send e-mail automaticaly with vb6, and for this I am using the code down here.
But the problem is with Outlook, when the e-mail should be sent. Outlook pops up a notification: "A program is trying to automatically send an email on my behalf. Do You want to allow this?". And there is to choose YES or NO.
How can this YES be chosen automatically from vb? (Because, the assumption is that user will not be present to click YES after he runs the application!)
VB6 Code:
Dim objOutlook As Object
Dim objOutlookMsg As Object
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(0)
With objOutlookMsg
.To = txt_ToEmail
.Subject = "Measurement data"
.Body = "Measurement data are in the attachment"
'.HTMLBody = "HTML version of message"
intFileNbr2 = FreeFile
.Attachments.Add (strFileName2)
.send
End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
-
Nov 24th, 2010, 12:07 PM
#2
Re: Problem with email (Outlook)
-
Nov 24th, 2010, 01:19 PM
#3
Thread Starter
Junior Member
Re: Problem with email (Outlook)
Hi, thanks.
I found this at the link, but i can't find this HKEY_CURRENT_USER in computer? Do You have any idea where it could be? In Program Files, Windows or....?
"The workaround is to disable this security prompt by setting/creating a REG_DWORD registry entry CheckAdminSettings = 1 located at HKEY_CURRENT_USER\Software\Policies\Microsoft\Security.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Security] "CheckAdminSettings"=dword:00000001"
-
Nov 24th, 2010, 02:41 PM
#4
Re: Problem with email (Outlook)
That's a hive in the Windows Registry. Start > Run > regedit
-
Nov 24th, 2010, 03:28 PM
#5
Thread Starter
Junior Member
Re: Problem with email (Outlook)
Ok, I found next: HKEY_CURRENT_USER\Software\Policies\Microsoft\,
but now there is not Security folder in that Microsoft folder. There are SystemCertificates and Windows. I don't know where should I put it now. I don' want to do something wrong. Do You have a clue what to do?
-
Nov 24th, 2010, 05:52 PM
#6
Re: Problem with email (Outlook)
It might be different key (what looks like a folder is called a 'key' in the registry, and files/items are called 'values'. The top/main keys are called hives (HKEY_...)) for different versions of Windows/Outlook.
I'm on a Mac now so I can't check how it looks. I found that link by Googling, give it a try you might find other suggestions.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|