Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Other Office > BOOK: Professional Outlook 2007 Programming ISBN: 978-0-470-04994-5
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Outlook 2007 Programming ISBN: 978-0-470-04994-5
This is the forum to discuss the Wrox book Professional Outlook 2007 Programming by Ken Slovak; ISBN: 9780470049945
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Outlook 2007 Programming ISBN: 978-0-470-04994-5 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 13th, 2007, 05:37 PM
Authorized User
Points: 457, Level: 7
Points: 457, Level: 7 Points: 457, Level: 7 Points: 457, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: Burbank, CA, USA.
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Arsi
Default COM add-in for Outlook 2003 written in VSTO '05 SE

Hello,

Can you point me in the right direction? I need to know how to write one for creating a new menu bar with links to published custom forms in Outlook. Then, I need to distribute it across a company network.

Any help with this would be wonderful.

Thanks,

Arsi

*******(*)*******
__________________
*******(*)*******
Reply With Quote
  #2 (permalink)  
Old December 13th, 2007, 05:49 PM
Wrox Author
 
Join Date: Sep 2007
Location: Winter Park, Florida, USA.
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can't "link" to a published custom form per se. What you'd have to do is to write a macro, say call it OpenFoobar. In that macro you'd have code to open an item using that published form's MessageClass:

   Public Sub OpenFoobar()
     Dim oContact As Outlook.ContactItem

     Set oContact = CreateItem(olContactItem)
     'make it a custom item
     oContact.MessageClass = "IPM.Contact.Foobar"
     oContact.Display
   End Sub

You could also get a reference to a folder's Items collection and use ItemAdd to add the item to a specific folder of course instead of using CreateItem.

Then you customize the menus and add that macro as a new button.

However, distributing VBA macros is not the way to go. It's also very hard to deploy a custom UI like that with VBA code. Deploying the VBA project also destroys any macros the users may already have.

The way to go is to make a COM addin that creates the UI, has the macros and procedures that are called when the buttons are clicked and deploy that. The COM addin code can even deploy and publish the custom forms if desired.

That's the best practice for something like you want.

If you don't know how to make a COM addin buy my book and learn :)



Ken Slovak
Reply With Quote
  #3 (permalink)  
Old December 13th, 2007, 06:23 PM
Authorized User
Points: 457, Level: 7
Points: 457, Level: 7 Points: 457, Level: 7 Points: 457, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: Burbank, CA, USA.
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Arsi
Default

Hi Ken,

Thank you for the response.

I've already created the macro to open the form. My issue now is writing the COM addin. I have your book. I'm actually holding it in my hand right now. The problem i'm having is that it describes how to write the COM addin for Outlook 2007 and I need to write it for Outlook 2003 or will do the instructions pertain to Outlook 2003 as well?

I've never written one before.

Thanks for the help.

Arsi

*******(*)*******
Reply With Quote
  #4 (permalink)  
Old December 13th, 2007, 06:51 PM
Wrox Author
 
Join Date: Sep 2007
Location: Winter Park, Florida, USA.
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The instructions are relevant to Outlook 2003 but of course anything related to the Ribbon or custom task panes wouldn't be applicable.

Unfortunately the VSTO 2005 SE download projects and templates contain a lot of version specific stuff generated by VSTO and won't let you load the project in a VSTO Outlook 2003 addin.

You are able to load the C# and VB.NET shared addin code or the VB6 addin code and then change the references to Outlook and Office 2003 and remove any Outlook 2007 or Office 2007 specific code or convert it to Outlook 2003 workarounds like Redemption code.

I haven't done it yet but I'm planning on putting up an equivalent set of templates and projects for Outlook 2003 on my Web site soon. I just haven't had time to finish double-checking the code so far.

Those will be projects and templates for Outlook 2003 in VB6, VB.NET & C# shared addins and VSTO C# and VB.NET addins, the equivalents of the Outlook 2007 versions.



Ken Slovak
Reply With Quote
  #5 (permalink)  
Old December 13th, 2007, 07:05 PM
Authorized User
Points: 457, Level: 7
Points: 457, Level: 7 Points: 457, Level: 7 Points: 457, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: Burbank, CA, USA.
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Arsi
Default

That's great news! Thanks again. I just have to finish this project in the next 2 days :( I don't think I can do it.

Arsi

*******(*)*******
Reply With Quote
  #6 (permalink)  
Old December 13th, 2007, 07:20 PM
Wrox Author
 
Join Date: Sep 2007
Location: Winter Park, Florida, USA.
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

2 days is a bit extreme. That's tight even for a very experienced addin developer just to write, tweak, test and debug a simple addin.

There's always debugging no matter what :(

Ken Slovak
Reply With Quote
  #7 (permalink)  
Old December 13th, 2007, 07:26 PM
Authorized User
Points: 457, Level: 7
Points: 457, Level: 7 Points: 457, Level: 7 Points: 457, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: Burbank, CA, USA.
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Arsi
Default

Yes! That's true. Wish me luck!


Thanks again,
Arsi

*******(*)*******
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Office 2003 absolute minimum w/VSTO? cjkoontz Visual Studio 2005 0 October 16th, 2008 10:36 AM



All times are GMT -4. The time now is 09:16 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.