Paste Lotus Notes email body to Word Document

  • Hello All,


    I am trying to paste the Lotus Notes email body to Word document and I'm almost successful in doing that. But when I paste the content to word it does not show the hyperlinks, it will just paste as text. Below is what I have tried so far. I would want the hyperlinks also from body of the email to be pasted to word document.


  • Re: Paste Lotus Notes email body to Word Document


    Rather than TypeText and GetItemValue("Body") which are text governed, try a Copy/Paste or Copy/PasteSpecial. I would show code how to do that but I don't have Lotus Notes anymore.

  • Re: Paste Lotus Notes email body to Word Document


    Thanks Kenneth for the response, I will try what u said and keep you posted!!!

  • Re: Paste Lotus Notes email body to Word Document


    Thanks Kenneth, but when I declare


    Dim wsp As New NotesUIWorkspace
    Dim curruidoc As NotesUIDocument
    Dim currdoc As NotesDocument


    This gives me an error, hence I'm unable to proceed further. Kindly provide me code which I can continue from where I have been stuck!!!

  • Re: Paste Lotus Notes email body to Word Document


    Since you did not post all of your code and you don't understand why you had the error, I am guessing that you used late binding. #6 code used early binding. Some like to code using early binding and produce the final product with late binding. Early binding will usually enable Intellisense for that object which makes coding easier. Early binding means that you have to set a reference to a library object in Tools > References...


    There may be two libraries needed. One of those will likely be Domino. A search for the Dim types may show you which objects to reference. If I find my old example files, I will see if I used objects for those types. I prefer early binding, usually.

  • Re: Paste Lotus Notes email body to Word Document


    Hello Kenneth,


    I have used early binding only, I have referenced 2 libraries Lotus Domino Objects and Lotus Notes Automation Classes.


    But NotesUIWorkspace does not get instanciate, is there any other work around for this?

  • Re: Paste Lotus Notes email body to Word Document


    I am unable to declare New NOTESUIWORKSPACE and also Dim doc As New NotesDocument(db).
    Also I could not understand the statement
    all doc.ReplaceItemValue("Form", "MailAudit")

  • Re: Paste Lotus Notes email body to Word Document


    Hello Kenneth,


    The reason why I am trying to copy the entire content of email and pasting into word document is, I was unable to copy the hyperlink from the email body as it was in hotspot properties. Hence I thought I will copy the email body content into word document and from there I could retrieve only the entire hyperlink

  • Re: Paste Lotus Notes email body to Word Document


    Lotus Notes Automation Classes is the reference to set. Remove New from your Dim. One can use New when you Set the object.


    Code
    Dim wsp As NotesUIWorkspace
    Dim curruidoc As NotesUIDocument
    Dim currdoc As NotesDocument
  • Re: Paste Lotus Notes email body to Word Document


    if you want to hyperlink, copy it, and paste as plain text in word. then highlight it and press enter. try it, see if it helps. I do that usually.

  • Re: Paste Lotus Notes email body to Word Document


    Thanks all for your response, its very unfortunate that nobody could provide the solution!!!

  • Re: Paste Lotus Notes email body to Word Document


    Perhaps - but please still observe the board rules...


    [indent]4b. Do not cross-post without supplying a link to the duplicate question on the other Forum.[/indent]


    You have posted this elsewhere - please add links to that/those thread(s).

  • Re: Paste Lotus Notes email body to Word Document


    Thank you for the link..


    It's been over 10 years since I used Lotus Notes in anger (and I was usually angry when working with it) but I always had issues with formatted text and Microsoft products.


    To add formatted text to a mail, Notes has the CREATERICHTEXTITEM method, as in

    Code
    Set oNotesField = oNotesDoc.CREATERICHTEXTITEM("Body")
    
    
    With oNotesField
        .AppendText.... blah blah


    Perhaps there's a corresponding GETRICHTEXTITEM method? (I would check but there's a limit to what I'll do ona phone).


    That's totally ignoring any issues you might have connecting to Notes in the first place and even if there is a GETRICHTEXTITEM method, that Word can actually understand it...

  • Re: Paste Lotus Notes email body to Word Document


    Hello Kenneth,


    I tried the link you have provided above but I get below error for the code


    Set db = session.CurrentDatabase


    Session has not been initialized


    Kindly let me know wat is wrong here.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!