![]() |
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
|
|||
|
|||
![]()
Hi,
I have a userform with a list that keeps email EntryId, Sendername, Subject , Recieved date. EntryID which is a 140 long string is in the first column (0) and is hidden. A simplified version of my code is : sub done() Dim msg As Outlook.MailItem Dim nms As Outlook.NameSpace Dim fld As Outlook.MAPIFolder Set msg = nms.GetItemFromID(lstQueue.List(indx, 0)) - generates error With msg .Subject = "DONE - " .Display End With End sub lstQueue.List(indx, 0)) correctly keeps the EntryID , but the line I showed with an arrow generates an error "Object variable or with block not set" . I can't figure out what's wrong , Any help will be greatly appriciated. I don't know if the reason for this error is not useing the storeID ? -- Best regards, Edward |
Ads |
#2
|
|||
|
|||
![]()
I think I have to explain more about what I’m trying to do . Ideally after
I receive an email and keep it’s EntryID in my listbox , usually there are several back and fort email’s in the same thread (Reply) Is there a way to catch all the email’s that are part of this thread? Example : First email :A send an email to B for a job request. Seoncd email :B replies with a question Third email :A replies with answer Fourth email : B finishes the job and replies with an email Is it a way to keep track of the most recent email in the same thread ? It’s easier to always work with the original email using it’s entryID , but because EntryID changes each time we reply to the original email I don’t know how to find the following emails and always reply to the most recent one? -- Best regards, Edward "Edward" wrote: Hi, I have a userform with a list that keeps email EntryId, Sendername, Subject , Recieved date. EntryID which is a 140 long string is in the first column (0) and is hidden. A simplified version of my code is : sub done() Dim msg As Outlook.MailItem Dim nms As Outlook.NameSpace Dim fld As Outlook.MAPIFolder Set msg = nms.GetItemFromID(lstQueue.List(indx, 0)) - generates error With msg .Subject = "DONE - " .Display End With End sub lstQueue.List(indx, 0)) correctly keeps the EntryID , but the line I showed with an arrow generates an error "Object variable or with block not set" . I can't figure out what's wrong , Any help will be greatly appriciated. I don't know if the reason for this error is not useing the storeID ? -- Best regards, Edward |
#3
|
|||
|
|||
![]()
I'd separate that line into two, the first one getting the EntryID from your
list object as a string. Then you can see if you are getting an actual value. The line you indicate should cause no errors unless indx or your list object aren't set correctly before you call GetItemFromID. You also might not have set "nms" as the NameSpace object. It's hard to tell from abbreviated code. Are you setting "nms", I don't see that. Don't rely on an EntryID having any specific number of characters, it can vary widely. -- 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 "Edward" wrote in message ... Hi, I have a userform with a list that keeps email EntryId, Sendername, Subject , Recieved date. EntryID which is a 140 long string is in the first column (0) and is hidden. A simplified version of my code is : sub done() Dim msg As Outlook.MailItem Dim nms As Outlook.NameSpace Dim fld As Outlook.MAPIFolder Set msg = nms.GetItemFromID(lstQueue.List(indx, 0)) - generates error With msg .Subject = "DONE - " .Display End With End sub lstQueue.List(indx, 0)) correctly keeps the EntryID , but the line I showed with an arrow generates an error "Object variable or with block not set" . I can't figure out what's wrong , Any help will be greatly appriciated. I don't know if the reason for this error is not useing the storeID ? -- Best regards, Edward |
#4
|
|||
|
|||
![]()
All items in a thread share the same ConversationTopic property. Each new
item adds a new date/time structure to the end of the ConversationIndex property, so the longer that property is the further down in the conversation it is, the shorter the nearer the start of the conversation. -- 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 "Edward" wrote in message ... I think I have to explain more about what I’m trying to do . Ideally after I receive an email and keep it’s EntryID in my listbox , usually there are several back and fort email’s in the same thread (Reply) Is there a way to catch all the email’s that are part of this thread? Example : First email :A send an email to B for a job request. Seoncd email :B replies with a question Third email :A replies with answer Fourth email : B finishes the job and replies with an email Is it a way to keep track of the most recent email in the same thread ? It’s easier to always work with the original email using it’s entryID , but because EntryID changes each time we reply to the original email I don’t know how to find the following emails and always reply to the most recent one? -- Best regards, Edward |
#5
|
|||
|
|||
![]()
Thanks Ken, I think conversation topic is the same as subject which is not
gonna be helpful because users change the subject when they reply. I tested with conversationIndex here is the result Original email recived 01C9D89635023F68E01D8F084ACD84E660C598661781 Reply 01C9D89635023F68E01D8F084ACD84E660C59866178100002C E980 Reply to reply 01C9D89635023F68E01D8F084ACD84E660C598661781000025 AFB0000015B880 As you mentioned each time we reply it adds a string to the previous string , how ever the only part which remains constant is the original string up to …781 and after that text changes . I send these data to Excel for some reporting purposes and I think I can find connection between them possibly by using instr() I have three questions. 1)You mentiones the addition string to the original conversationindex has datetime structure , can we somehow use them? Like retrieve a date from it ? 2)Is conversationindex same as EntryId? 3)Assuming I have a conversationindex how can I find that specific email among hundreds of emails in my inbox and display it? -- Best regards, Edward "Ken Slovak - [MVP - Outlook]" wrote: All items in a thread share the same ConversationTopic property. Each new item adds a new date/time structure to the end of the ConversationIndex property, so the longer that property is the further down in the conversation it is, the shorter the nearer the start of the conversation. -- 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 "Edward" wrote in message ... I think I have to explain more about what I’m trying to do . Ideally after I receive an email and keep it’s EntryID in my listbox , usually there are several back and fort email’s in the same thread (Reply) Is there a way to catch all the email’s that are part of this thread? Example : First email :A send an email to B for a job request. Seoncd email :B replies with a question Third email :A replies with answer Fourth email : B finishes the job and replies with an email Is it a way to keep track of the most recent email in the same thread ? It’s easier to always work with the original email using it’s entryID , but because EntryID changes each time we reply to the original email I don’t know how to find the following emails and always reply to the most recent one? -- Best regards, Edward |
#6
|
|||
|
|||
![]()
Even if users in a conversation change the subject the original
ConversationTopic will remain the same. That's how Outlook can show the By Conversation view. Neither ConversationTopic nor ConversationIndex are at all the same as EntryID. ConversationTopic can be used in a filter or restriction on the Items collection of a folder, so you can filter items in that Items collection by that property. If items are scattered in different folders you would have to repeat that in each of those folders. An alternative approach would be to use an AdvancedSearch and set up a search string for that ConversationTopic. That can be set to run on any arbitrary set of folders and to return a unified set of results from all the target folders. -- 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 "Edward" wrote in message ... Thanks Ken, I think conversation topic is the same as subject which is not gonna be helpful because users change the subject when they reply. I tested with conversationIndex here is the result Original email recived 01C9D89635023F68E01D8F084ACD84E660C598661781 Reply 01C9D89635023F68E01D8F084ACD84E660C59866178100002C E980 Reply to reply 01C9D89635023F68E01D8F084ACD84E660C598661781000025 AFB0000015B880 As you mentioned each time we reply it adds a string to the previous string , how ever the only part which remains constant is the original string up to …781 and after that text changes . I send these data to Excel for some reporting purposes and I think I can find connection between them possibly by using instr() I have three questions. 1)You mentiones the addition string to the original conversationindex has datetime structure , can we somehow use them? Like retrieve a date from it ? 2)Is conversationindex same as EntryId? 3)Assuming I have a conversationindex how can I find that specific email among hundreds of emails in my inbox and display it? -- Best regards, Edward |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
eMail client not retrieving messages | Ron Hinds[_2_] | Outlook Express | 8 | February 20th 09 07:36 PM |
Retrieving the message and subject of email | Markus | Outlook and VBA | 1 | April 23rd 07 06:58 AM |
Retrieving exe file from email | Jerry Bujas | Outlook - General Queries | 2 | September 7th 06 01:20 PM |
Retrieving deleted email | [email protected] | Outlook - General Queries | 4 | May 11th 06 06:47 PM |
Retrieving delete email | [email protected] | Outlook - General Queries | 0 | May 11th 06 12:27 AM |