export email as a file?

Posted on 2006-04-06
Last Modified: 2013-12-18
I have an email that has lots of twisties containing other emails and pics etc

is there any way to export that email to a file so i can share it on a network drive?

Question by:jlymn

    Author Comment

    guess I should have said, its notes7 i'm using!
    LVL 22

    Expert Comment

    Hi jlymn,
    only as a picture file (jpeg, gif).

    For the purpose of creating image of document the method
        flag = notesDocument.RenderToRTItem( notesRichTextItem )
    is used.

    Before calling that method call this one:
        Call notesUIDocument.ExpandAllSections
    to expand all those twisties.

    Hope this helps,
    LVL 22

    Expert Comment


    Author Comment


    thanks for the link, do you know how i would implement the code? I've not done any notes development before. Do i just need basic notes package and to create a macro somehow?

    LVL 22

    Accepted Solution

    you need Lotus Notes Client (which you obviously have since you read LN mail) and Lotus Domino Designer (to enter database design - code).
    Do you have Domino Designer?

    If yes:
    Using BitBlt operations you can easily copy selected documents from a view as seperate Word documents.
    Make sure you have a field called "Subject" in each document, or modify the call to the CopyScreenRectToWord parameters accordingly.
    By default the size of the region is set to 600x600, starting from the corner of the Notes Document content, and you can change this size as needed.

    Create an agent called CopyNotesDocumentToWordPicture, and put the agent target as "All Selected Documents":
    Const SRCCOPY& = &HCC0020
    Const CF_BITMAP& = 2
    Declare Function GetFocus Lib "USER32" () As Long
    Declare Function GetDC Lib "USER32" (Byval hWnd As Long) As Long
    Declare Function DeleteDC Lib "GDI32" ( Byval hDC As Long) As Long
    Declare Function ReleaseDC Lib "USER32" (Byval hWnd As Long, Byval hDC As Long) As Long
    Declare Function CreateCompatibleDC Lib "GDI32" ( Byval hDC As Long) As Long
    Declare Function CreateCompatibleBitmap Lib "GDI32" ( Byval hDC As Long, Byval nWidth As Long, Byval nHeight As Long) As Long
    Declare Function SelectObject Lib "GDI32" ( Byval hDC As Long, Byval hObject As Long) As Long
    Declare Function BitBlt Lib "GDI32" ( Byval hDCDest As Long, Byval XDest As Long, Byval YDest As Long, Byval nWidth As Long, Byval nHeight As Long, Byval hDCSrc As Long, Byval XSrc As Long, Byval YSrc As Long, Byval dwRop As Long) As Long
    Declare Function OpenClipboard Lib "USER32" (Byval hWnd) As Long
    Declare Function EmptyClipboard Lib "USER32" () As Long
    Declare Function SetClipboardData Lib "USER32" (Byval wFormat As Long, Byval hMem As Long) As Long
    Declare Function CloseClipboard Lib "USER32" () As Long
    Dim appWord

    Sub Initialize
        Set appWord = CreateObject("Word.Application")
        Dim workspace As New notesuiworkspace
        Dim uidoc As NotesUIDocument
        Dim session As New notessession
        Dim db As notesdatabase
        Dim col As notesdocumentcollection
        Dim doc As notesdocument
        Dim i As Long
        Set db=session.CurrentDatabase
        Set col=db.unprocesseddocuments
        Set doc=col.getfirstdocument
        While Not doc Is Nothing
            Set uidoc=workspace.EditDocument(True,doc)
            Call CopyScreenRectToWord(exportpath & doc.Subject(0), 0, 0, 600, 600)
            uidoc.Close True ' True=immediate close, needs Notes 5.0.7 or higher
            Set doc=col.getnextdocument(doc)

    Hope this helps,
    LVL 18

    Assisted Solution

    Question, why not print to PDF?  check out for inexpensive pdf printing solution.  You can export to PDF, encrypt and even attach a password so the document can't be changed.

    Author Comment

    thanks, i'll try both these so i'll split the points

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    Title # Comments Views Activity
    Validating Email Address 13 262
    Why won't this building block macro run? 6 278
    Lotus notes VB code 4 197
    Add a cc field to email code 3 83
    Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
    This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now