A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

test for new message



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 9th 06, 02:26 PM posted to microsoft.public.outlook.program_vba
Martin
external usenet poster
 
Posts: 87
Default test for new message

thanks Eric - just what I needed.

"Eric Legault [MVP - Outlook]" wrote:

Try the Sent property; it will be False for new messages, True for old ones.

--
Eric Legault (Outlook MVP, MCDBA, old school WOSA MCSD, B.A.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Martin" wrote:

I'm using the NewInspector event in the ThisOutlookSession module to
customise how users are greeted when they create a new message. I'm using:
If TypeOf Inspector.CurrentItem Is Outlook.MailItem
to make sure this code only runs for a message (and not a contact or
anything else that's being created!).

That's fine - however, I also need a test to stop the code running if the
user opens up an old message. Does anyone know a neat way of doing this?
The only thoughts I've had are the messages Saved property (which doesn't
work because it shows as True even for a new message) and testing that the
Inspector's Caption starts with "Untitled" (which of course includes old
messages without a subject).

Thanks

Ads
 




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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2002 test message. Wendy Outlook - General Queries 1 February 10th 06 10:50 AM
Unable to send test message when setting up email account Brad Outlook - General Queries 9 January 11th 06 03:44 PM


All times are GMT +1. The time now is 04:29 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-2025 Outlook Banter.
The comments are property of their posters.