Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / VS Tools for Office / February 2006

Tip: Looking for answers? Try searching our database.

Any way to start Outlook via Automation?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mdpowers - 17 Feb 2006 20:35 GMT
Is there a good way to start Outlook via Automation from a .Net program?  It
appears that when I create my object reference, it does not actually start
Outlook ... and I can't find a property that will activate it or make it
visible.

Any suggestions?
Sue Mosher [MVP-Outlook] - 17 Feb 2006 20:57 GMT
What kind of application are you building? If you're building a VSTO 2005 add-in for Outlook 2003, then you don't need to start Outlook. It's already started when your add-in loads and the ThisApplication object handles Outlook.Application.

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Is there a good way to start Outlook via Automation from a .Net program?  It
> appears that when I create my object reference, it does not actually start
> Outlook ... and I can't find a property that will activate it or make it
> visible.
>
> Any suggestions?
mdpowers - 17 Feb 2006 21:26 GMT
Hi Sue,

Actually, we are building a VSTO add-in ... but we need to be able to start
Outlook from our main database program at times.  The add-in ONLY runs when
Outlook is running.  Rather than telling users to start Outlook when they
decide to synchronize the two, it would be nice to be able to start Outlook
for them.

> What kind of application are you building? If you're building a VSTO 2005 add-in for Outlook 2003, then you don't need to start Outlook. It's already started when your add-in loads and the ThisApplication object handles Outlook.Application.
>
[quoted text clipped - 4 lines]
> >
> > Any suggestions?
Sue Mosher [MVP-Outlook] - 17 Feb 2006 21:38 GMT
There are several possible problems with that approach:

1) Anti-virus programs on your machine may block access to New Outlook.Application or CreateObject("Outlook.Application")

2) How are you planning the situation where the use has more than one mail profile? Rare, to be sure, but it certainly can happen.

If you want Outlook to be visible, then you have to tell it what to make visible -- what folder or item to display.

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Hi Sue,
>
[quoted text clipped - 10 lines]
>> > Outlook ... and I can't find a property that will activate it or make it
>> > visible.
mdpowers - 17 Feb 2006 22:14 GMT
We've had no problems with our existing VisualFoxPro app opening Outlook via
CreateObject("Outlook.Application").  

Aha, I think I may see what I need ...

this.ContactsFolder =
this.Session.GetDefaultFolder(OlDefaultFolders.olFolderContacts);
this.ContactsFolder.Display();

Is this what you were thinking?

I'm not planning to start on an inbox explorer ... more likely Contacts or
Calendar.

> There are several possible problems with that approach:
>
[quoted text clipped - 18 lines]
> >> > Outlook ... and I can't find a property that will activate it or make it
> >> > visible.
Sue Mosher [MVP-Outlook] - 18 Feb 2006 02:16 GMT
Yes, that's the idea exactly.
Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Aha, I think I may see what I need ...
>
[quoted text clipped - 6 lines]
> I'm not planning to start on an inbox explorer ... more likely Contacts or
> Calendar.

>> If you want Outlook to be visible, then you have to tell it what to make visible -- what folder or item to display.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.