none
Is it possible to control Outlook from Word or Excel? RRS feed

  • Question

  • Does anyone know if it's possible to run and control "Outlook Web Access" (OWA) using VBA in either Excel or Word 2007 ???   I do have my own personal login name and password for "Outlook Web Access".  It would be great if I could run a script that sends my username/password to Outlook, composes a messages, sends the message, and finally logs off.   Can I do this using Office VBA?  If not, does Outlook Web Access have any command line parameters that might achieve the same task?

    Robert Crandal

     


    jmmc
    Tuesday, March 8, 2011 9:10 AM

Answers

  • OWA is a server-side Web application running on a company's IIS machine.
     
    You could create a VBA UserForm that has a Web browser control on it and send the browser control the URL and login information for the Exchange mailbox, but at that point it's the same as running OWA in any Web browser.
     
    You get no hooks into OWA for programming. Any OWA programming is done server-side and compiled and run on the IIS machine.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Robert Crandal" <=?utf-8?B?Um9iZXJ0IENyYW5kYWw=?=> wrote in message news:3ff15acf-249e-48f0-8f8d-e3e17c0a255c...

    Does anyone know if it's possible to run and control "Outlook Web Access" (OWA) using VBA in either Excel or Word 2007 ???   I do have my own personal login name and password for "Outlook Web Access".  It would be great if I could run a script that sends my username/password to Outlook, composes a messages, sends the message, and finally logs off.   Can I do this using Office VBA?  If not, does Outlook Web Access have any command line parameters that might achieve the same task?

    Robert Crandal

     


    jmmc

    Ken Slovak MVP - Outlook
    Tuesday, March 8, 2011 3:00 PM
  • You misunderstand what I said.
     
    You cannot put OWA on a user form. You can put a Web browser control on a user form. How you do that is entirely up to you and if you actually have a browser control in your VBA toolbox. If not you have to work with a raw instance of MSHTML, which is another story.
     
    If you get a browser control on a form then how you call into OWA depends completely on the OWA setup and login. I have no idea about that setup at all. You need to see how the login to OWA from a normal Web browser is passed to OWA and mimic that. Possibly a querystring, but that depends on the setup and OWA version and various other factors.
     
    This is something that you really need to post on in an Exchange development group to find out more about OWA and working with OWA. It's really out of scope for this forum in terms of VSTO development, and you won't find a lot of server-side or ASPX expertise here.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Robert Crandal" <=?utf-8?B?Um9iZXJ0IENyYW5kYWw=?=> wrote in message news:3a5055cd-bbcd-4de3-b45a-a9b923fddb4c...

    If I do put OWA on a userform, how do I send the login and password information?  Also, which MS object should I look for if I want to put OWA in a userform?

    Thank you Ken!


    jmmc

    Ken Slovak MVP - Outlook
    Wednesday, March 9, 2011 2:12 PM

All replies

  • OWA is a server-side Web application running on a company's IIS machine.
     
    You could create a VBA UserForm that has a Web browser control on it and send the browser control the URL and login information for the Exchange mailbox, but at that point it's the same as running OWA in any Web browser.
     
    You get no hooks into OWA for programming. Any OWA programming is done server-side and compiled and run on the IIS machine.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Robert Crandal" <=?utf-8?B?Um9iZXJ0IENyYW5kYWw=?=> wrote in message news:3ff15acf-249e-48f0-8f8d-e3e17c0a255c...

    Does anyone know if it's possible to run and control "Outlook Web Access" (OWA) using VBA in either Excel or Word 2007 ???   I do have my own personal login name and password for "Outlook Web Access".  It would be great if I could run a script that sends my username/password to Outlook, composes a messages, sends the message, and finally logs off.   Can I do this using Office VBA?  If not, does Outlook Web Access have any command line parameters that might achieve the same task?

    Robert Crandal

     


    jmmc

    Ken Slovak MVP - Outlook
    Tuesday, March 8, 2011 3:00 PM
  • If I do put OWA on a userform, how do I send the login and password information?  Also, which MS object should I look for if I want to put OWA in a userform?

    Thank you Ken!


    jmmc
    Tuesday, March 8, 2011 7:11 PM
  • You misunderstand what I said.
     
    You cannot put OWA on a user form. You can put a Web browser control on a user form. How you do that is entirely up to you and if you actually have a browser control in your VBA toolbox. If not you have to work with a raw instance of MSHTML, which is another story.
     
    If you get a browser control on a form then how you call into OWA depends completely on the OWA setup and login. I have no idea about that setup at all. You need to see how the login to OWA from a normal Web browser is passed to OWA and mimic that. Possibly a querystring, but that depends on the setup and OWA version and various other factors.
     
    This is something that you really need to post on in an Exchange development group to find out more about OWA and working with OWA. It's really out of scope for this forum in terms of VSTO development, and you won't find a lot of server-side or ASPX expertise here.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Robert Crandal" <=?utf-8?B?Um9iZXJ0IENyYW5kYWw=?=> wrote in message news:3a5055cd-bbcd-4de3-b45a-a9b923fddb4c...

    If I do put OWA on a userform, how do I send the login and password information?  Also, which MS object should I look for if I want to put OWA in a userform?

    Thank you Ken!


    jmmc

    Ken Slovak MVP - Outlook
    Wednesday, March 9, 2011 2:12 PM