Hi
I have a document containing a url I want to email. I create the Body field then do a .AppendText( url ). But at 80 chars into the url, the AppendText puts in a carriage return so the url is now on 2 lines and the link doesn't work. Is there a way to have AppendText paste the full line of text I pass into the RT field?
thanks
clem
I am quite sure, that it is NOT the appendtext that adds the linewrap at 80 characters.
if you just call a doc.Save(True,true,true) after the appendText and check that document I heavily guess that you will find that there is no line wrap at 80 characters. This is something that the router does on sending the email. Still the problem stays the same: you need to send mail without line wrapping long links...
There are multiple ways to do this, but none is easy unfortunately.
You could create html code for the link like <a href="YourLongLink">Linkdescription</a>, then use a temporary document, that you open, goto richtextitem, call NotesUiDocument.Import("HTML File", tempfilename), save it, close it and then append the resulting richtextitem to your richtextitem.
or you could create a form with only a body field, create a link in a document created with that form, export it as XML, take the resulting string, manipulate it using find & replace to put the „real“ link in there and then use the DXLImporter class to create a document from that you then use to append to your richtextitem.
you see: quite complicated... better try to shorten the link using domino web server configuration like url rewrite or url redirect....
then you enter the url
Https://dominoserver/longurlid=01428EC8612345
and let the server redirect / convert it to
https://dominoserver/this/is/a/long/path.nsf/123445664324554333455544/01428EC8612345?opendocument
I still can't believe how hard it is to do simple things with the Notes rich text classes. This is the kind of thing our Midas LSX has allowed easily as far back as 1997. But assuming you don't want to purchase a third party product for this one thing, and assuming that you don't mind the front end requirement imposed by the NotesUIDocument, the import is probably your best bet. (Plenty of other good reasons to try our product, of course, but leave that aside.)