wolfgangimig / joa

Java Library for Developing Microsoft Outlook Add-ins
MIT License
12 stars 12 forks source link

Joa for Outlook 2003 and create a create in Outlook #10

Open saadahmed42 opened 6 years ago

saadahmed42 commented 6 years ago

Hi, Does Joa support plug-in development for Outlook 2003? Also, I don't see the Add-in register button next to the bug icon.

Also, is there a way to add a button to the email Compose ribbon bar/command bar using JOA? Is there a way to create a contact using the Outlook Object Model using Joa? If yes, could I get an example.

Saad

wolfgangimig commented 6 years ago

Outlook 2003

JOA does not support Outlook 2003

register button

Follow the steps described here: https://github.com/wolfgangimig/joa/wiki/Create-a-New-Debug-Configuration

add a button to the email compose ribbon

The tutorial shows how to add a button to the explorer window, https://github.com/wolfgangimig/joa/wiki/Tutorial#define-a-ribbon-tab. In order to add the button to the mail compose window, create a XML file for ribbon ID Microsoft.Outlook.Mail.Compose

create a contact

Creating a contact with JOA is similar to creating a note, https://github.com/wolfgangimig/joa/wiki/Tutorial#add-a-button-click-handler. The following lines should create a contact:

com.wilutions.mslib.outlook.Application app = Globals.getThisAddin().getApplication();
ContactItem contactItem = app.CreateItem(OlItemType.olContactItem).as(ContactItem.class);
contactItem.setFirstName("Berta");
contactItem.setLastName("Blume");
contactItem.Save();