Consulting

Results 1 to 4 of 4

Thread: Outlook Security Warning - Email

  1. #1
    VBAX Tutor Philcjr's Avatar
    Joined
    Jul 2005
    Location
    Bedminster, NJ
    Posts
    208
    Location

    Outlook Security Warning - Email

    I have searched and read many websites already and I am just not clear if it is possible to turn off the "annoying" security warning message from Outlook.

    All I want to do is send a simple e-mail with a message.

    From this code, can anyone help?

    [vba]
    Sub EMail_Test()

    Dim OutApp As Object, OutMail As Object

    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)

    On Error Resume Next
    With OutMail
    .To = "Philip.Collins@pfizer.com"
    .Subject = "The US20 SKU File has been updated"
    .Body = "Completed File Scrub"
    .Display
    End With
    On Error GoTo 0

    Set OutMail = Nothing
    Set OutApp = Nothing

    End Sub

    [/vba]

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    VBAX Tutor Philcjr's Avatar
    Joined
    Jul 2005
    Location
    Bedminster, NJ
    Posts
    208
    Location
    Lucas,

    Thanks for moving this to the Outlook section... I was not sure if this was and Excel or Outlook issue.

    I have not tried this link, when I get back into work in the AM, I will try and post back my results.

  4. #4
    VBAX Tutor Philcjr's Avatar
    Joined
    Jul 2005
    Location
    Bedminster, NJ
    Posts
    208
    Location
    Lucas,

    While surfing around on "Ron de Bruin" site: http://www.rondebruin.nl/mail/prevent.htm

    I found this, using the "Send Keys" (commented lines)... however, when the e-mail is created, the window loses its focus... any idea how to activate/set focus to the new e-mail window?

    [vba]
    On Error Resume Next
    With OutMail
    .To = "Philip.Collins@.com"
    .Subject = "Completed File Scrub"
    .Body = UserName & " has completed the US20 SKU File scrub"
    .Display
    'Application.Wait (Now + TimeValue("0:00:02"))
    'Application.SendKeys "%s"
    End With
    On Error GoTo 0
    [/vba]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •