Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


in the mean time i found some basic stuff who can do the job.
It looks ugly: but it works and the content is "formated as in the Writerdoc"

Copy the Body content from a opened Writerdoc, then use this content from the clpiboard to send the Email

Sub Main

oMailProvider = CreateUNOService("")
oCont = CreateUNOListener("CurCont_","")
oAuth = CreateUNOListener("Authent_","")


oClip = CreateUnoService("")

oMailServiceObj =
rem Use the contents of the clipboard as the content of the email
oMail = oMailServiceObj.create( "", "", "SUBJECT",oClip.getContents())

xMailServer = oMailProvider.Create("")

msgbox xMailServer.isConnected


End Sub

Function CurCont_GetValueByName(s) as Any
    Select Case s
        Case "ServerName"
            CurCont_GetValueByName = ""
        Case "Port"
            CurCont_GetValueByName = 25
        Case "ConnectionType"
            CurCont_GetValueByName = "Insecure"
    End Select
End Function

Function Authent_GetUserName() as Any
    Authent_GetUserName = ""
End Function

Function Authent_GetPassword()
    Authent_GetPassword = "mypassword"
End Function

sub copydoccontentToClipboard
dim document   as object
dim dispatcher as object
dim oDoc, oVC
oVC = ThisComponent.CurrentController.getViewCursor
dispatcher = createUnoService("")
dispatcher.executeDispatch(ThisComponent.CurrentController.Frame, ".uno:Copy", "", 0, Array())
end sub

Unsubscribe instructions: E-mail to
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.