Home > Back-end >  VBA - Lotus Notes - Output Email History
VBA - Lotus Notes - Output Email History

Time:09-07

I hope someone can put me on the right path, I have code that simply outputs emails received today into an excel spreadsheet by connecting to the database and then popping out the NotesDocument.Document items. Now what I cannot see within those items is reference to History as I'd like to be able to tell whether these output email have been replied to.

Where is this part located within Notes and how would I access reference to it?

If anyone knows what I could look into or read to help me retrieve this information it would be greatly appreciated.

CodePudding user response:

If you look at the (FollowUpMemoSubform) in the mail template, you will see that it contains this section.

enter image description here

The appearance of these lines is controlled by hide-when formulas that check for a NotesItem called $RespondedTo. The logic for the first line ("This message has been replied to") is

@IsNewDoc | !@IsAvailable(DeliveredDate) | !@IsAvailable(PostedDate) |
!@IsAvailable($RespondedTo) | !$RespondedTo="1"

The hide-when formulas for the other two lines are similar, but they are checking for "2" or "3".

The basic logic is: It's been replied to if $RespondedTo is 1 or 3. It's been forwarded if $RespondedTo is 2 or 3. The checks of DeliveredDate and PostedDate are there (I think) to exclude drafts. The check of @IsNewDoc is there for when you are composing a brand new message that has not yet been saved, but that's not an issue for you since those messages aren't in the NSF file so you'll never read them.

  • Related