Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

EntryID

0 views
Skip to first unread message

Matt

unread,
Jul 16, 2002, 5:59:53 PM7/16/02
to
Hi,

Does anyone have details on the EntryID value for a Task. I need a unique
number for every task. EntryID gives it to me, but it is a very long hex
string. Anyone have a hash function that gives me a unique but more
reasonable number from it? Alternately another way to generate a unique
number would be appreciated.

Thanks,

Matt


Ken Slovak - [MVP - Outlook]

unread,
Jul 17, 2002, 8:45:48 AM7/17/02
to
EntryID is unique, but not necessarily persistent. If the item is
moved to a different folder or different InfoStore the EntryID
changes.

I usually use a CDO method of the Session object,
Session.CreateConversationIndex to create GUID's in my Outlook code,
but they are also long and you have to have CDO installed for that.
Using the Windows API you can use CoCreateGUID to create a unique tag
but that is also long. How about just getting the time and date and
making that a GUID string?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


"Matt" <Ma...@terraengine.com> wrote in message
news:tH0Z8.310$7p1....@news1.telusplanet.net...

Matt

unread,
Jul 17, 2002, 10:08:12 AM7/17/02
to
Hi Ken,

Thanks for the response. What I have done is create a task for filling an
order. I want to be able to provide an order number to the customer and
have focused on EntryID because Outlook ensures it uniqueness. Time and
Date will run me into concurrency problems (two people pressing submit at
the same instance). I can't be the only one wanting this so am I doing
something wrong?

Thanks,

Matt

"Ken Slovak - [MVP - Outlook]" <kens...@mvps.org> wrote in message
news:uPbbN$YLCHA.1604@tkmsftngp09...

Sue Mosher [MVP]

unread,
Jul 17, 2002, 10:26:46 AM7/17/02
to
In a small office, appending the user's initials should get around the
concurrency issue.

--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming - coming Fall 2002
http://www.slipstick.com/books/jumpstart.htm


"Matt" <Ma...@terraengine.com> wrote in message

news:gTeZ8.3160$Vl5....@news0.telusplanet.net...

Ken Slovak - [MVP - Outlook]

unread,
Jul 18, 2002, 9:22:22 AM7/18/02
to
You can do as Sue suggests and use the initials appended to the
date/time or use one of my other suggestions. It's not at all unusual,
but EntryID is not the best thing to use since it may change for an
item.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm

"Matt" <Ma...@terraengine.com> wrote in message

news:gTeZ8.3160$Vl5....@news0.telusplanet.net...

Matt

unread,
Jul 18, 2002, 5:18:47 PM7/18/02
to
Hi Ken and Sue,

I think between the two of you I am heading for a solution. Sue how would I
retrieve the initials? CurrentUser seems to be dependent on how the user
setup their preferences. Also is possible to extend CurrentUser? That
would solve alot of problems for me.

Thanks,

Matt


"Ken Slovak - [MVP - Outlook]" <kens...@mvps.org> wrote in message

news:#NeVW#lLCHA.1120@tkmsftngp10...

Sue Mosher [MVP]

unread,
Jul 18, 2002, 6:55:13 PM7/18/02
to
Depends. If you're using Exchange, I'd walk up the folder tree to the
mailbox root and get the name from there. (CurrentUser triggers security
prompts.)

Here's a VBA snippet that gets it from an environment variable:

Function WSHUserName() As String

Set objWSHShell = CreateObject("WScript.Shell")

WSHUserName = _

objWSHShell.ExpandEnvironmentStrings("%username%")

Set objWSHShell = Nothing

End Function


--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of

Microsoft Outlook Programming - coming September 2002
http://www.slipstick.com/books/jumpstart.htm


"Matt" <Ma...@terraengine.com> wrote in message

news:XgGZ8.4279$8D4.2...@news2.telusplanet.net...

0 new messages