Open Outlook from Access

Hey Lucy

Registered User.
Local time
Today, 12:06
Joined
Jan 20, 2012
Messages
124
I have a macro set to email a form to a person once a condition is met. This works fine but I've discovered that Outlook (2010) has to be open BEFORE this macro is invoked.

I wanted to add a step to the macro before the one that makes it email that basically says to open Outlook.

I have tried the RunApplication macro, but I apparently am not getting the path right. I don't understand what the problem is.

I accidentally dragged Outlook to my desktop and therefore created a shortcut from my Start Menu, but now when I go to Microsoft Office in my Start Menu, Microsoft Outlook isn't one of the options. I can't find the path to where it may reside now.

I am using the path to the shortcut on my desktop.

C:\Users\Just Me\Desktop\Microsoft Outlook 2010

What else am I supposed to do?

Thanks!
 
Isn't the path in the shortcut properties?
 
KenHigg,

All the properties show is the shortcut path and not the path to its location. Never ran across that before. I mean, normally that's how I track down the original location of a shortcut. Sigh.
 
Do a search on c: for outlook.exe

On my pc its here:

"C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE"
 
Ken,

That's it! Thanks so much for your help! I still don't understand why the path to residential doesn't show on shortcut, but glad to find out where to find it anyway!

Again, thanks!
 
Thanks Ken! I have never used this feature before but it is so cool in this particular database!!! It's one I did for a real estate company. Now when a property is assigned to one of the agents, it emails the agent a notification of a new property assignment! Woohoo! Love it!. Thanks for your help!
 
Here's an email function that does not even open Outlook:

Code:
Public Function fncEmail(strTo As String, strFrom As String, strSubject As String, strMessage As String)

    Const cdoSendUsingPort = 2
    Const cdoBasic = 1
    Dim objCDOConfig As Object, objCDOMessage As Object
    Dim strSch As String

    strSch = "http://schemas.microsoft.com/cdo/configuration/"
    Set objCDOConfig = CreateObject("CDO.Configuration")
    With objCDOConfig.Fields
        .Item(strSch & "sendusing") = cdoSendUsingPort
        .Item(strSch & "smtpserver") = "SMTP.delta.Com"
        .Item(strSch & "smtpauthenticate") = cdoBasic
        .Item(strSch & "sendusername") = " "
        .Update
    End With

    Set objCDOMessage = CreateObject("CDO.Message")
    With objCDOMessage
        Set .Configuration = objCDOConfig
        .FROM = strFrom
        .sender = strFrom
        .To = strTo
        .subject = strSubject
        .HTMLBody = strMessage
        .Send
    End With
    Set objCDOMessage = Nothing
    Set objCDOConfig = Nothing


End Function
 
Ken -- thanks for that. Unfortunately, I don't know VB, but am going to learn it as soon as I can free up some time. I have had to get into it and do a few minor tweaks to my program, but I couldn't actually write code myself. I'm going to copy this to keep for my future development!!! This would be great, as my client actually does not like using Outlook! lol
 

Users who are viewing this thread

Back
Top Bottom