Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Programming in Outlook (http://www.outlookbanter.com/outlook-vba/61090-programming-outlook.html)

Erik November 13th 07 10:40 AM

Programming in Outlook
 
I would like to make a script for Outlook 2007and don't know where to begin
(I'm not a VB programmer). What I want seems simple enough to me to
accomplish. Everytime I click NEW email, I'd like this script to auto insert
the following into the subject line of the email

YY_MM_DD_St_this following text I would enter in by hand

Year, month, day, and the St are my initials. All my company emails are
archived, and I need to find a way to particularily identify every email I
send. This was the best idea I could come up.

Is this possible at all? Also, some workstations here are still running
Outlook 2003. Can I install a similar script on these older workstations?
Would the script be the same or must it be different?

Thank you for the help.

Eric Legault [MVP - Outlook] November 13th 07 07:44 PM

Programming in Outlook
 
My blog has an article that explains how to wire up Outlook so that code runs
when you want it to whenever a new e-mail is created (or an existing one is
opened):

Eric Legault My Eggo : Getting a Handle on Your E-mails with VBA:
http://blogs.officezealot.com/legault/pages/20086.aspx

Most default e-mail properties are probably sufficient for uniquely
identifying an e-mail: sender and receipient names, date received, subject,
etc. Every Outlook item also has a unique EntryID property, but that is only
viewable with code, not in a view.

Any VBA code written for Outlook 2007 will work on previous versions of
Outlook without modification. Just watch out for any Folder object
declarations - this is MAPIFolder in previous versions.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Erik" wrote:

I would like to make a script for Outlook 2007and don't know where to begin
(I'm not a VB programmer). What I want seems simple enough to me to
accomplish. Everytime I click NEW email, I'd like this script to auto insert
the following into the subject line of the email

YY_MM_DD_St_this following text I would enter in by hand

Year, month, day, and the St are my initials. All my company emails are
archived, and I need to find a way to particularily identify every email I
send. This was the best idea I could come up.

Is this possible at all? Also, some workstations here are still running
Outlook 2003. Can I install a similar script on these older workstations?
Would the script be the same or must it be different?

Thank you for the help.


Erik November 14th 07 08:36 AM

Programming in Outlook
 
Ok, thanks for the information. Yes, your comment about email properties is
correct, but when a customer replies to various emails that have the same
subject but regard various identical subcontractors, a person starts getting
confused and doesn't know which email is associated to which contract. For
this reason, I thought it might be easier to attach an "incident" or "case"
number to each email. I've seen a similar system used by some technical
support departments online.

I scanned over your page, and it seemed a bit over my head. However, this
is something I really want to get my feet wet with, so I'm going to read over
again making sure I understand everything that is going on. I noticed that
you had many other useful pages. I just need to start studying. Thanks for
your help and responses.

many regards,
erik

"Eric Legault [MVP - Outlook]" wrote:

My blog has an article that explains how to wire up Outlook so that code runs
when you want it to whenever a new e-mail is created (or an existing one is
opened):

Eric Legault My Eggo : Getting a Handle on Your E-mails with VBA:
http://blogs.officezealot.com/legault/pages/20086.aspx

Most default e-mail properties are probably sufficient for uniquely
identifying an e-mail: sender and receipient names, date received, subject,
etc. Every Outlook item also has a unique EntryID property, but that is only
viewable with code, not in a view.

Any VBA code written for Outlook 2007 will work on previous versions of
Outlook without modification. Just watch out for any Folder object
declarations - this is MAPIFolder in previous versions.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Erik" wrote:

I would like to make a script for Outlook 2007and don't know where to begin
(I'm not a VB programmer). What I want seems simple enough to me to
accomplish. Everytime I click NEW email, I'd like this script to auto insert
the following into the subject line of the email

YY_MM_DD_St_this following text I would enter in by hand

Year, month, day, and the St are my initials. All my company emails are
archived, and I need to find a way to particularily identify every email I
send. This was the best idea I could come up.

Is this possible at all? Also, some workstations here are still running
Outlook 2003. Can I install a similar script on these older workstations?
Would the script be the same or must it be different?

Thank you for the help.


Eric Legault [MVP - Outlook] November 14th 07 04:26 PM

Programming in Outlook
 
Take a look at the MailItem_Open event. This may be the ideal spot to
generate a unique identifier and put it in the subject line.

If you have any more questions post back.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Erik" wrote:

Ok, thanks for the information. Yes, your comment about email properties is
correct, but when a customer replies to various emails that have the same
subject but regard various identical subcontractors, a person starts getting
confused and doesn't know which email is associated to which contract. For
this reason, I thought it might be easier to attach an "incident" or "case"
number to each email. I've seen a similar system used by some technical
support departments online.

I scanned over your page, and it seemed a bit over my head. However, this
is something I really want to get my feet wet with, so I'm going to read over
again making sure I understand everything that is going on. I noticed that
you had many other useful pages. I just need to start studying. Thanks for
your help and responses.

many regards,
erik

"Eric Legault [MVP - Outlook]" wrote:

My blog has an article that explains how to wire up Outlook so that code runs
when you want it to whenever a new e-mail is created (or an existing one is
opened):

Eric Legault My Eggo : Getting a Handle on Your E-mails with VBA:
http://blogs.officezealot.com/legault/pages/20086.aspx

Most default e-mail properties are probably sufficient for uniquely
identifying an e-mail: sender and receipient names, date received, subject,
etc. Every Outlook item also has a unique EntryID property, but that is only
viewable with code, not in a view.

Any VBA code written for Outlook 2007 will work on previous versions of
Outlook without modification. Just watch out for any Folder object
declarations - this is MAPIFolder in previous versions.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Erik" wrote:

I would like to make a script for Outlook 2007and don't know where to begin
(I'm not a VB programmer). What I want seems simple enough to me to
accomplish. Everytime I click NEW email, I'd like this script to auto insert
the following into the subject line of the email

YY_MM_DD_St_this following text I would enter in by hand

Year, month, day, and the St are my initials. All my company emails are
archived, and I need to find a way to particularily identify every email I
send. This was the best idea I could come up.

Is this possible at all? Also, some workstations here are still running
Outlook 2003. Can I install a similar script on these older workstations?
Would the script be the same or must it be different?

Thank you for the help.



All times are GMT +1. The time now is 04:14 PM.

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