Body field of Notes mail document does not contain the email text - lotus-notes

The Body field of Notes mail document in the database does not contain the actual email text at all, but just contains the HTML elements.
However, the actual email text is seen when this Notes mail document is opened in the browser.
We are using the below code snippet to fetch the email text:
Set nrtNotesRichTextItem=ndocEmailDocument.GetFirstItem ("Body")
strEmail = strEmail + "<br>" + nrtNotesRichTextItem.GetUnformattedText
As the Body field does not contain the actual email text, the variable strEmail is not returning the text, but returning the hyperlink text which when is clicked, redirects to a web page that contains the actual email text that we need.
Any leads on this?

You probably have a multi-value Body. (Confirm by looking at the items in the properties of the document: Alt+Enter, second tab, scroll in the left pane to find "Body" and see how many times it occurs.)
Try accessing the rest using v in something like the below:
Forall v In nrtNotesRichTextItem.Values
End Forall

Based on what you have described in comments, you are dealing with a large MIME message. Do you see just the actual text in View -> Show Page Source? Or do you see MIME headers, dividers, tags, and text? This is the crucial question.
Notes provides a GetMIMEEntity method in the NotesDocument class and it provides the NotesMIMEEntity class with various methods to traverse the structure of a MIME message and extract its content.

Related

sharepoint custom list: multi-line field content is blank when person/group field has multiple values

I have a custom list with the following fields:
Title: Single line of text
Description: Multiple lines of text
Remarks: Multiple lines of text
Recipient: Person or Group
Whenever I input two or more people in the Recipient field, in View Item page (Display form), contents of Description and Remarks becomes blank/empty.
Contents are displayed okay on the main view of custom list, and in EDIT mode.
If I input a single person only in the Recipient field, the contents for Description and Remarks are displayed in Display form.
Note: Recipient field is set to accept multiple values. I'm using Sharepoint 2013.
I am new to Sharepoint and I'd like to know a way on how to troubleshoot/debug this matter. Or are the multi-line fields somehow connected to the person field? Or any setting that I need to setup? How can I check?
I tried to search but I found no same situation as far.
If there is no customization in Display form, it should work fine. If it works for Single User in Recipient, It should work for multiple users too.
For further troubleshooting, You can create a test list and create same type of columns in it. Then see if the Display form works fine in that test list. It will let you know if the issue is related to the specific list or it's generic. You can then narrow down your troubleshooting options based on this result.

Sharepoint 2010 Content types Hyperlinks and Word QuickParts

Sharepoint 2010I'm slowly making progress with Sharepoint, but have encountered a problem with Content Types and Word Quickparts.
What I'm trying to do:
I want a Content type to hold summary information for manuals and related documents that might be located in separate libraries. I want to display this information in a Table within Word (by setting up a template) using Word Quick Parts>Document property fields.This table would then summarise all the relevant fields and their related links at the top of a document that in turn summarises information about a particular system.This Word document in turn would be stored in a separate document library.
This all works fine for dates, text descriptions, check boxes, yes/no fields and drop down selections as I can find the related Word Quick Parts>Document Property
However, the "Hyperlink or Picture" Type fields are not present in the Word Quick Parts>Document Property fields. SoAm I completely misunderstanding what content types are for? orIs there a setting within sharepoint that would make these hyperlinks visible in the Word Quick Parts?or Is there a better alternate solution. Thanks!
Hyperlink is not available as property in Word Quick Parts.
Sadly, you can access to this field in Word when you click in the property icon. This will display all the SharePoint property of the document with the hyperlink field.
A workaround would be to create a simple text field and to put the URL of the hyperlink field in this field. (With Workflow or Event Receiver)
An another deep solution is proposed in this link :
https://social.msdn.microsoft.com/Forums/office/en-US/c7619237-baa1-4669-af65-0f0a39223aad/sharepoint-metadata-and-office-quickparts-hyperlinks-are-not-appearing-in-the-quick-part-list?forum=worddev
This is about create two properties, one for the text, one for the url. Then to arrange it in Word in order to get an hyperlink.
Since Microsoft seems to be removing a lot of its legacy web pages, the content of the above link is copied below:
a. In the sharepoint list, you will need two text properties, one for
the link text and one for the display text. Let's call them hllink1
and hldisplay1. For a sample document, put some text in each of these
properties.
b. in the template,
insert the hllink1 Document Property and the hldisplay1 Document Property. This is a temporary move that will let you change thevalues
of these properties without displaying the DIP
insert a HYPERLINK field as follows
use ctrl-F9 to insert a pair of field code braces { }
type HYPERLINK "" between the {}, so you have
{ HYPERLINK "" }
then insert another copy of the hllink1 Document Property between the ""
{ HYPERLINK "the Document Property for hllink1" }
c. select the Hyperlink field and use F9 to update it. When you show
the result (Alt-F9), you should see a clickable hyperlink where the
"display text" is the same as the link text
d. Click somewhere inside the display text, and insert the hldisplay1
Document Property.
e. Carefully select the remainder of the display text and delete it.
You should stil be left with a hyperlink that can be ctrl-clicked in
the usual way.
f. Modify the texts in hllink1 and hldisplay1. However notice that,
as a maximum, the hyperlink display text will update automatically.
The tooltip for the hyperlink does not update automatically.
g. Select the hyperlink and press F9 to update it. The tooltip/link
text should update

CRM 2011: Display the Body of an Email In Another Entity

Can I show the body (description) of an email in a custom entity?
I have tried to copy the content of the description field into a field in the custom entity, but end up with all the formatting showing.
What about putting an iFrame of the email on the custom entity form and then manipulating the email until it only show the email description?
The body of an email is html. If you put the content in a control of CRM will not formatted. You can put in a iframe (html page) or a web resource of type html and put only the body of the email. This solution permits don't occupying so much space as your solution.

Missing data in Text box in a infopath 2010 form

I have a infopath 2010 form with a table and couple of text boxes and this form is configured to submit a email with the form in the body of the email.
The form is opened in a browser and I am able to add text and submit the form and I see the email. But the form ( with data ) in the body of the email has lost formatting and the text field on the form was set to a width of 100% and as a 'Multi line ' text and I see that the data in the text field as we see on the email body is chooped off.
I am having issues controlling the format of the form as we seen in the browser and they way it shows up on the email body.
Any help is appreciated.
Sri
I have had this problem to. The way that I got around this is by creating another view for the form and then having the exact same layout but changing all the controlls so that they are calculated fields this then seems to give you the values.
thanks, Jack

Automatically add hyperlinks to text in received emails

In Lotus Notes 8.5, is there a way I can automatically search received emails for a certain string and add a hyperlink/hotspot to every occurence of this string?
For example, can I make it so every email I receive containing the string 'Stack overflow' hyperlinks that text to stackoverflow.com?
Yes, there is a feature in the Notes client called "Live Text" that allows you to set up text patterns and actions and wire them together to do what you want. Here is a link to an article that describes the feature.

Resources