Patrick Plattes wrote:
Hello,
i have a calc document with a button to send the document - but i don't
know how *g*. This little function is able to open a new mail mit a
given recipient.
I used UNO:SendMail befor, there i couldn't set the recipient :(. Any
sample code is also very nice.
I hope anyone is able to help. Thanks,
Patrick
Sub send2
cEMailAddress = "[EMAIL PROTECTED]"
cSubject = "Some usual SPAM."
oMailer = createUnoService( "com.sun.star.system.SimpleSystemMail" )
oMailClient = oMailer.querySimpleMailClient()
oMessage = oMailClient.createSimpleMailMessage()
oMessage.setRecipient( cEMailAddress )
oMessage.setSubject( cSubject )
' Now i want to attache this document, but i dont know how
'oMessage.setAttachement( document )
oMailClient.sendSimpleMailMessage( oMessage, 0 )
End Sub
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Read the section titled " Sending Email" in my free macro document... I
have not tried this since version 1.0.x, but there are some examples there.
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info: http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]