View Single Post
  #18  
Old June 2nd 08, 03:02 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,610
Default Possible to Disable Object Model Guard?

I also like Paul's article on CDO for Windows at http://www.paulsadowski.com/WSH/cdo.htm a lot and recommend it to people looking to use CDO to send messages without security prompts.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"ryguy7272" wrote in message ...
After querying some great resources, both in my office and on the web, I've
come to the conclusion that this can't be done practically with our Outlook
mail system. The IT guys would have to give certain types of permission,
which they won't do, even if they did have time to do it. I could use other
technologies, but I really wanted to send the emails through Outlook, so I
could find certain files in my 'Sent Items' if I needed to. This is
certainly not possible with some of the other technology options at my firm,
because those other email tools literally bypass Outlook altogether.

Anyway, this was a great resource:
http://www.rondebruin.nl/cdo.htm

I learned a lot by reading the information here. I hope others can too...


Regards,
Ryan---

--
RyGuy


"Sue Mosher [MVP-Outlook]" wrote:

As described in the article you were referred to at http://www.outlookcode.com/article.aspx?ID=52, there are two types of prompts -- a time-limited prompt for access to address-limited information and a prompt for sending messages that appears for each message.

The sender's email address has nothing to do with the SMTP server that you would use to deliver an outgoing message. See my response to your other post.



"ryguy7272" wrote in message ...
Ok, I couldn't just leave it alone; I like to finish whatever I start.

I found this code:
Dim myOlApp As Outlook.Application
Dim mpfInbox As Outlook.MAPIFolder
Dim obj As Outlook.MailItem
Dim myOlExp As Outlook.Explorer
Dim myOlSel As Outlook.Selection

Set myOlApp = CreateObject("Outlook.Application")
Set mpfInbox = myOlApp.GetNamespace("MAPI").GetDefaultFolder(olFo lderInbox)

If mpfInbox.Items(1).Class = olMail Then
Set obj = mpfInbox.Items.Item(1)
MsgBox obj.SenderEmailAddress
End If


This causes a prompt that asks if a user would like to 'Allow Access for x
Minutes'. I thought, ok, good, I’d like to allow access for 1 minute, that's
all it will take to send my emails. I thought the Outlook security prompts
would be disabled for 1 minute, but no, another popup comes up and I have to
'Allow' all the email to be sent just like before, by clicking the 'Yes'
button each time. The code does give me my SMTP server address, right. I
think that’s what it is called.
obj.SenderEmailAddress

Also, to get Excel to cooperate with Outlook, I had to add this line back in:
Set objMessage = CreateObject("CDO.Message")

Well, I guess I made a little progress, but it still doesn’t do what I
envisioned it doing.
Any more suggestions, recommendations, etc.? Sorry for being so thick with
all this stuff.



Ads
 

Debt - MPAA - Credit - Car Insurance - Remortgages