Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22
  1. #16
    dick is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Oct 2010
    Posts
    17

    Unhappy


    If it isn't one thing it's another! Now I'm getting the security warning box from OutLook (A program is attempting . . . ALLOW or DENY etc). In WLM it was a simple click on the Security option and deselect the function. But I'm going nuts trying to find how to do that in OutLook. Any guidance would be much appreciated. HELP has not lived up to it's name. Forums are tedious, Google seldom shows what I want at the top of the list etc. Grrrrrr!!!!!

  2. #17
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    I have heard that complaint before and really don't know the solution. I am using Office 2007 and my auto email procedure runs without that warning, but I am not using SendObject.
    Code:
    'open Outlook, attach zip folder or file, send e-mail
    Dim appOutLook As Outlook.Application
    Dim MailOutLook As Outlook.MailItem
    Set appOutLook = CreateObject("Outlook.Application")
    Set MailOutLook = appOutLook.CreateItem(olMailItem)
    With MailOutLook
        .BodyFormat = olFormatRichText
        .To = "email address"
        ''.cc = ""
        ''.bcc = ""
        .Subject = "text here"
        .HTMLBody = "text here"
        .Attachments.add ("path\filename")
        ''.DeleteAfterSubmit = True 'This would let Outlook send the note without storing it in your sent bin
        .send
    End With
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #18
    dick is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Oct 2010
    Posts
    17
    Hmmmm. Interesting. I suppose I could do what you are doing. Somewhat
    more complex but not too much. Might even work with WLM !! Is the .Subject limited to 256 characters as in SendObject?

  4. #19
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Probably, but never challenged it.

    Google: VBA email sendobject warning
    Here is one
    http://www.everythingaccess.com/tuto...curity-Warning
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #20
    dick is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Oct 2010
    Posts
    17
    Tried your code but I'm missing something. Got a Compile error on both the Dim statements - undefined type. Can you provide the type definitions and where they should be placed (module, procedure)?

  6. #21
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    You need to set a VBA reference to the Outlook library.

    From the VBA editor menu Tools > References, scroll down until you find Microsoft Outlook and check it.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #22
    dick is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Oct 2010
    Posts
    17

    Smile Solved at last!!

    That was it!!
    Ran a test with my email address hard wired and it worked like a champ.

    Thank you for all your guidance and the snippet of code.

    Annoying that SendObject has no options to do what your code does.

    I'll look for documentation on this method and see what else I can set. Right now I'm not using any attachments but setting a "From:" would be nice to direct any replies somewhere else. I did look at vbMAPI and have a few questions in to them but certainly for now what you gave me is just fine. Thanks again.

    dick

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Leveraging SendObject and default local mail client
    By chris.williams in forum Programming
    Replies: 0
    Last Post: 12-08-2011, 04:42 PM
  2. Replies: 11
    Last Post: 09-12-2011, 11:30 AM
  3. Query Entity Names, and Column Names
    By Accidental DBA in forum Queries
    Replies: 1
    Last Post: 07-22-2011, 02:38 PM
  4. Replies: 5
    Last Post: 04-24-2011, 03:14 AM
  5. SendObject
    By weshader in forum Access
    Replies: 1
    Last Post: 11-09-2009, 04:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums