Boa tarde pessoal,
Tenho o seguinte codigo em uma macro porém não estou conseguindo de forma alguma anexar uma planilha de excel ao e-mail.
Alguém por favor poderia ajudar?
Obrgada!! Aceito quaisquer sugestões rs
Dim Notes As Object
Dim Maildb As Object
Dim WorkSpace As Object
Dim UIdoc As Object
Dim UserName As String
Dim MailDbName As String
Sub TesteEmail()
Set Notes = CreateObject("Notes.NotesSession")
UserName = Notes.UserName
MailDbName = Left$(UserName, 1) & Right$(UserName, (Len(UserName) - InStr(1, UserName, " "))) & ".nsf"
Set Maildb = Notes.GetDatabase(vbNullString, MailDbName)
Set WorkSpace = CreateObject("Notes.NotesUIWorkspace")
Call WorkSpace.COMPOSEDOCUMENT(, , "Memo")
Set UIdoc = WorkSpace.CURRENTDOCUMENT
Recipient = "[email protected]"
Call UIdoc.FIELDSETTEXT("EnterSendTo", Recipient)
Subject1 = "teste notes"
Call UIdoc.FIELDSETTEXT("Subject", Subject1)
Call UIdoc.GOTOFIELD("Body")
Call UIdoc.INSERTTEXT("teste")
'Attach
Call UIdoc.EmbedObject(1454, "", "C:UsersIBM_ADMINDesktopblerg", "LA.xls") 'Dá um erro nessa linha -> Run-time error 438 Object doesn 't support this property or method
Call UIdoc.EmbedObject(EMBED_ATTACHMENT, "", "C:UsersIBM_ADMINDesktopblergLA.xls") 'Nada acontece
'clean up
Set UIdoc = Nothing: Set WorkSpace = Nothing
Set Maildb = Nothing: Set Notes = Nothing
Set Body = Nothing
End Sub
Postado : 27/09/2012 2:35 pm