![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hello,
i am creating a new contact using vba ************ Set objFolder = myNameSpace.GetDefaultFolder(olFolderContacts) Set objItems = objFolder.Items With objItems.Add 'Create new Contact Entry .FirstName = "" .LastName = "" .HomeAddressStreet = " '... .Save *********** How do I determine the EntryID of the newly created contact at it creation so I can store it? Thank you, QB End With |
#2
|
|||
|
|||
![]() You don't set the ID yourself. Call the item's Save method, then yo can read the EntryID created by Outlook. -- Best regards Michael Bauer - MVP Outlook Use Outlook Categories? This is Your Tool: http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6 Am Sun, 24 Feb 2008 17:00:00 -0800 schrieb Question Boy: Hello, i am creating a new contact using vba ************ Set objFolder = myNameSpace.GetDefaultFolder(olFolderContacts) Set objItems = objFolder.Items With objItems.Add 'Create new Contact Entry .FirstName = "" .LastName = "" .HomeAddressStreet = " '... .Save *********** How do I determine the EntryID of the newly created contact at it creation so I can store it? Thank you, QB End With |
#3
|
|||
|
|||
![]()
Michael,
That is exactly my question. How can one do that, detrmine the EntryID of a newly created contact item? After the .save how can I determine and pass the EntryID for the newly created contact item to a variable? Thank you, QB "Michael Bauer [MVP - Outlook]" wrote: You don't set the ID yourself. Call the item's Save method, then yo can read the EntryID created by Outlook. -- Best regards Michael Bauer - MVP Outlook Use Outlook Categories? This is Your Tool: http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6 Am Sun, 24 Feb 2008 17:00:00 -0800 schrieb Question Boy: Hello, i am creating a new contact using vba ************ Set objFolder = myNameSpace.GetDefaultFolder(olFolderContacts) Set objItems = objFolder.Items With objItems.Add 'Create new Contact Entry .FirstName = "" .LastName = "" .HomeAddressStreet = " '... .Save *********** How do I determine the EntryID of the newly created contact at it creation so I can store it? Thank you, QB End With |
#4
|
|||
|
|||
![]() After it's stored you can read the property like this: Dim objItems as Outlook.Items Dim Contact as Outlook.ContactItem Dim ID$ Set Contact=objItems.Add Contact.Save ID = Contact.EntryID -- Best regards Michael Bauer - MVP Outlook Use Outlook Categories? This is Your Tool: http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6 Am Mon, 25 Feb 2008 03:20:03 -0800 schrieb Question Boy: Michael, That is exactly my question. How can one do that, detrmine the EntryID of a newly created contact item? After the .save how can I determine and pass the EntryID for the newly created contact item to a variable? Thank you, QB "Michael Bauer [MVP - Outlook]" wrote: You don't set the ID yourself. Call the item's Save method, then yo can read the EntryID created by Outlook. -- Best regards Michael Bauer - MVP Outlook Use Outlook Categories? This is Your Tool: http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6 Am Sun, 24 Feb 2008 17:00:00 -0800 schrieb Question Boy: Hello, i am creating a new contact using vba ************ Set objFolder = myNameSpace.GetDefaultFolder(olFolderContacts) Set objItems = objFolder.Items With objItems.Add 'Create new Contact Entry .FirstName = "" .LastName = "" .HomeAddressStreet = " '... .Save *********** How do I determine the EntryID of the newly created contact at it creation so I can store it? Thank you, QB End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
EntryID problem | vonClausowitz | Outlook and VBA | 3 | August 23rd 07 04:31 PM |
EntryID | Ela | Outlook and VBA | 2 | April 13th 07 01:10 AM |
Invalid ENTRYID??? | Sandy | Outlook - Using Contacts | 3 | July 20th 06 11:08 PM |
EntryID is nothing | donald | Add-ins for Outlook | 2 | March 20th 06 06:08 PM |
EntryID | Arne Baldauf | Outlook and VBA | 3 | February 4th 06 06:41 PM |