Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   Outlook 2003 or 2007 ? which one? (http://www.outlookbanter.com/add-ins-outlook/58566-outlook-2003-2007-one.html)

Amit October 9th 07 10:12 AM

Outlook 2003 or 2007 ? which one?
 
Hello Folks,

Company wants me to create an add-ins for Microsoft Outlook. They (company)
asked me to decide whether Microsoft Outlook 2003 or Microsoft Outlook 2007
would be better.

Management would be happy if I go with Microsoft Outlook 2003 because they
don't need to buy licenses to update Microsoft Operating system as well as
Microsoft Office/ Outlook 2007 (Currently they are running Microsoft Windows
2000 Prof. on client machine with Microsoft Office 2003).

As a developer I will face lots of limitation with Microsoft Outlook 2003
COM because my requirement is as follow:
1. Read a Mail (with internet header) and
2. Send it across through web service, which will save it to the database.
Both operations must be done without showing security dialog box that
Microsoft Outlook 2003 gives.

Now what I’ve gathered on 2007 development forum/ and available codes that
we can achieve both easily in Microsoft Outlook 2007.

If I go for Outlook 2003, obviously I've a choice of redemption. But I am
not sure if it is easy to get Internet header through it... (I tried to use
SaveAs(…) option but it does not store entire header that I am looking for -
RFC 822 format) .

What would you suggest me here – go for outlook 2003 or outlook 2007?

Please help me ASAP as I need to make decision in a day or two.

Thanks heaps.
Am



Ken Slovak - [MVP - Outlook] October 9th 07 03:10 PM

Outlook 2003 or 2007 ? which one?
 
In terms of trusted code and not firing the security prompts, if your addin
uses the application object passed in OnConnection to your code to derive
all Outlook objects then it doesn't matter at all if it's Outlook 2003 or
2007.

PR_TRANSPORT_MESSAGE_HEADERS is available and easily retrieved from a
Redemption item:

const int PR_TRANSPORT_MESSAGE_HEADERS = 0x007D001E;

RDOMail mail = (RDOMail)rdoSession.GetItemFromID(olMail.EntryID,
olMail.Parent.StoreID, missing);

string headers = (string)mail.Fields(PR_TRANSPORT_MESSAGE_HEADERS);

The same can be done using Outlook 2007's PropertyAccessor object.

In this case PropertyAccessor wouldn't truncate your headers but any
properties in the PS_PUBLIC_STRINGS area or other user-created namespaces do
limit you to approximately 4K of data before the data is truncated. Some
property types will return up to 8K of data.

Of course any UI you create for Inspectors, if there is any, would be
different for the versions. For Outlook 2007 you'd use the Ribbon and for
Outlook 2003 you'd be using the CommandBars interfaces.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Amit" wrote in message
...
Hello Folks,

Company wants me to create an add-ins for Microsoft Outlook. They
(company)
asked me to decide whether Microsoft Outlook 2003 or Microsoft Outlook
2007
would be better.

Management would be happy if I go with Microsoft Outlook 2003 because they
don't need to buy licenses to update Microsoft Operating system as well as
Microsoft Office/ Outlook 2007 (Currently they are running Microsoft
Windows
2000 Prof. on client machine with Microsoft Office 2003).

As a developer I will face lots of limitation with Microsoft Outlook 2003
COM because my requirement is as follow:
1. Read a Mail (with internet header) and
2. Send it across through web service, which will save it to the database.
Both operations must be done without showing security dialog box that
Microsoft Outlook 2003 gives.

Now what I’ve gathered on 2007 development forum/ and available codes that
we can achieve both easily in Microsoft Outlook 2007.

If I go for Outlook 2003, obviously I've a choice of redemption. But I am
not sure if it is easy to get Internet header through it... (I tried to
use
SaveAs(…) option but it does not store entire header that I am looking
for -
RFC 822 format) .

What would you suggest me here – go for outlook 2003 or outlook 2007?

Please help me ASAP as I need to make decision in a day or two.

Thanks heaps.
Am




Amit October 10th 07 12:44 AM

Outlook 2003 or 2007 ? which one?
 
Thank you Ken.

Your reply has almost gave me the answer. However, I am still not confident
on what you've said about disabling security prompts with objects.

I am currrently using the shared-add-ins template project, provided by
Microsoft Visual Studio 2005 that generates line of code to connects with the
Outlook:

[GuidAttribute("DE8C31FA-3401-4EB5-955A-F74390256D3E"),
ProgId("MyAddin1.Connect")]
public class Connect : Object, Extensibility.IDTExtensibility2
{
/// summary
public void OnConnection(object application, Extensibility.ext_ConnectMode
connectMode, object addInInst, ref System.Array custom)
{
applicationObject = application;
addInInstance = addInInst;
}

---

but if I would install this add-in and try to read mail item , it is giving
me security prompt.

I think your point is not triggering on what you are trying to refer

Please advise with some sample (if possible).

Thank you once again.

Am

"Ken Slovak - [MVP - Outlook]" wrote:

In terms of trusted code and not firing the security prompts, if your addin
uses the application object passed in OnConnection to your code to derive
all Outlook objects then it doesn't matter at all if it's Outlook 2003 or
2007.

PR_TRANSPORT_MESSAGE_HEADERS is available and easily retrieved from a
Redemption item:

const int PR_TRANSPORT_MESSAGE_HEADERS = 0x007D001E;

RDOMail mail = (RDOMail)rdoSession.GetItemFromID(olMail.EntryID,
olMail.Parent.StoreID, missing);

string headers = (string)mail.Fields(PR_TRANSPORT_MESSAGE_HEADERS);

The same can be done using Outlook 2007's PropertyAccessor object.

In this case PropertyAccessor wouldn't truncate your headers but any
properties in the PS_PUBLIC_STRINGS area or other user-created namespaces do
limit you to approximately 4K of data before the data is truncated. Some
property types will return up to 8K of data.

Of course any UI you create for Inspectors, if there is any, would be
different for the versions. For Outlook 2007 you'd use the Ribbon and for
Outlook 2003 you'd be using the CommandBars interfaces.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Amit" wrote in message
...
Hello Folks,

Company wants me to create an add-ins for Microsoft Outlook. They
(company)
asked me to decide whether Microsoft Outlook 2003 or Microsoft Outlook
2007
would be better.

Management would be happy if I go with Microsoft Outlook 2003 because they
don't need to buy licenses to update Microsoft Operating system as well as
Microsoft Office/ Outlook 2007 (Currently they are running Microsoft
Windows
2000 Prof. on client machine with Microsoft Office 2003).

As a developer I will face lots of limitation with Microsoft Outlook 2003
COM because my requirement is as follow:
1. Read a Mail (with internet header) and
2. Send it across through web service, which will save it to the database.
Both operations must be done without showing security dialog box that
Microsoft Outlook 2003 gives.

Now what I’ve gathered on 2007 development forum/ and available codes that
we can achieve both easily in Microsoft Outlook 2007.

If I go for Outlook 2003, obviously I've a choice of redemption. But I am
not sure if it is easy to get Internet header through it... (I tried to
use
SaveAs(…) option but it does not store entire header that I am looking
for -
RFC 822 format) .

What would you suggest me here – go for outlook 2003 or outlook 2007?

Please help me ASAP as I need to make decision in a day or two.

Thanks heaps.
Am





Ken Slovak - [MVP - Outlook] October 10th 07 02:42 PM

Outlook 2003 or 2007 ? which one?
 
You're only showing your OnConnection code, how are you instantiating the
mail item and how are you trying to read it?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Amit" wrote in message
...
Thank you Ken.

Your reply has almost gave me the answer. However, I am still not
confident
on what you've said about disabling security prompts with objects.

I am currrently using the shared-add-ins template project, provided by
Microsoft Visual Studio 2005 that generates line of code to connects with
the
Outlook:

[GuidAttribute("DE8C31FA-3401-4EB5-955A-F74390256D3E"),
ProgId("MyAddin1.Connect")]
public class Connect : Object, Extensibility.IDTExtensibility2
{
/// summary
public void OnConnection(object application, Extensibility.ext_ConnectMode
connectMode, object addInInst, ref System.Array custom)
{
applicationObject = application;
addInInstance = addInInst;
}

---

but if I would install this add-in and try to read mail item , it is
giving
me security prompt.

I think your point is not triggering on what you are trying to refer

Please advise with some sample (if possible).

Thank you once again.

Am



Amit October 11th 07 01:04 AM

Outlook 2003 or 2007 ? which one?
 
function onConnection( object application ... )
{

Outlook.Application _outlookApplication = (Outlook.Application) application;
_outlookApplication.ItemSend += ... (ProcessBeforeSend);

}

public void ProcessBeforeSend(object Item ... )
{
Outlook.MailItem mail = (Outloook.MailItem) Item;
// here is the code to read mail header ,and the body and then call web
service that save mail, with attachments into the database.

}


Is that what you are looking for?




"Ken Slovak - [MVP - Outlook]" wrote:

You're only showing your OnConnection code, how are you instantiating the
mail item and how are you trying to read it?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Amit" wrote in message
...
Thank you Ken.

Your reply has almost gave me the answer. However, I am still not
confident
on what you've said about disabling security prompts with objects.

I am currrently using the shared-add-ins template project, provided by
Microsoft Visual Studio 2005 that generates line of code to connects with
the
Outlook:

[GuidAttribute("DE8C31FA-3401-4EB5-955A-F74390256D3E"),
ProgId("MyAddin1.Connect")]
public class Connect : Object, Extensibility.IDTExtensibility2
{
/// summary
public void OnConnection(object application, Extensibility.ext_ConnectMode
connectMode, object addInInst, ref System.Array custom)
{
applicationObject = application;
addInInstance = addInInst;
}

---

but if I would install this add-in and try to read mail item , it is
giving
me security prompt.

I think your point is not triggering on what you are trying to refer

Please advise with some sample (if possible).

Thank you once again.

Am




Ken Slovak - [MVP - Outlook] October 11th 07 02:10 PM

Outlook 2003 or 2007 ? which one?
 
The Internet headers don't exist on the item until after it is received. A
sent item never has PR_TRANSPORT_MESSAGE_HEADERS (the Internet headers),
even after it's sent out.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Amit" wrote in message
...
function onConnection( object application ... )
{

Outlook.Application _outlookApplication = (Outlook.Application)
application;
_outlookApplication.ItemSend += ... (ProcessBeforeSend);

}

public void ProcessBeforeSend(object Item ... )
{
Outlook.MailItem mail = (Outloook.MailItem) Item;
// here is the code to read mail header ,and the body and then call web
service that save mail, with attachments into the database.

}


Is that what you are looking for?



Amit October 11th 07 03:43 PM

Outlook 2003 or 2007 ? which one?
 
Yes you are right.

Actually I'd asked you to provide me the way to create a component such that
there would not be any security alert.

You have already given an answer on how to get INternet Header.


BTW, do you suggest any good book for Outlook 2007?



"Ken Slovak - [MVP - Outlook]" wrote:

The Internet headers don't exist on the item until after it is received. A
sent item never has PR_TRANSPORT_MESSAGE_HEADERS (the Internet headers),
even after it's sent out.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Amit" wrote in message
...
function onConnection( object application ... )
{

Outlook.Application _outlookApplication = (Outlook.Application)
application;
_outlookApplication.ItemSend += ... (ProcessBeforeSend);

}

public void ProcessBeforeSend(object Item ... )
{
Outlook.MailItem mail = (Outloook.MailItem) Item;
// here is the code to read mail header ,and the body and then call web
service that save mail, with attachments into the database.

}


Is that what you are looking for?




Ken Slovak - [MVP - Outlook] October 11th 07 06:34 PM

Outlook 2003 or 2007 ? which one?
 
For programming Outlook 2007? Well, I'd be remiss if I didn't recommend my
own book :)

In addition to that there's a more beginner level book by Sue Mosher, it's
referenced on her www.outlookcode.com Web site, and a book by Randy Byrne
and Ryan Gregg of the Outlook team called Building Applications with Outlook
2007 from MS Press.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Amit" wrote in message
...
Yes you are right.

Actually I'd asked you to provide me the way to create a component such
that
there would not be any security alert.

You have already given an answer on how to get INternet Header.


BTW, do you suggest any good book for Outlook 2007?




All times are GMT +1. The time now is 11:20 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com