hum, entendi. De qualquer jeito eu já consegui colocar o link. Ainda não está do jeito que eu queria que era poder mudar o nome do link, ao invés de ficar www.google.com ficar Google, ou qualquer outro nome que eu escolher. O bom, é que dá pra mudar a fonte, deixar ela negrito, mudar a cor... Dá para mudar a pessoa que está enviando também. Public Sub EnviarEmail()
Dim Maildb As Object
Dim UserName As String
Dim MailDbName As String
Dim MailDoc As Object
Dim MailField As Object
Dim MailStyle As Object
Dim AttachME As Object
Dim Session As Object
Dim EmbedObj As Object
Dim Body As Object
Dim Destinatario As String
Dim Copia(25) As Object
Dim Assunto As String
Dim Remetente As String = "remetente"
Session = CreateObject("Notes.NotesSession")
'Get the sessions username and then calculate the mail file name.
'You may or may not need this as for MailDBname with some systems you can pass an empty string
UserName = Session.UserName
If InStr(1, UserName, " ") = 0 Then
MailDbName = UserName.Substring(1, InStr(1, UserName, "/") - 1)
MailDbName = "as_" & Replace(MailDbName, "CN=", "") & ".nsf"
Else
MailDbName = "as_" & UserName.Substring(3, 1) & UserName.Substring(InStr(1, UserName, " "))
MailDbName = MailDbName.Substring(0, (InStr(1, MailDbName, "/")) - 1) & ".nsf"
End If
'Open the mail database in notes
Maildb = Session.GETDATABASE("", MailDbName)
If Maildb.ISOPEN = True Then
Else
Maildb.OPENMAIL()
GoTo fimFunction
End If
MailDoc = Maildb.CREATEDOCUMENT
MailDoc.Form = "Memo"
' Create 'Body' of memo
Body = MailDoc.CREATERICHTEXTITEM("Body")
MailStyle = Session.CREATERICHTEXTSTYLE
' Create 'From' Field
MailField = MailDoc.APPENDITEMVALUE("FROM", Remetente)
MailField = MailDoc.APPENDITEMVALUE("Principal", Remetente)
With Body
.APPENDTEXT("texto")
.AddNewLine(2)
.APPENDTEXT(" lala ")
MailStyle.Bold = True
Call Body.APPENDSTYLE(MailStyle)
.APPENDTEXT("oi")
MailStyle.Bold = False
Call Body.APPENDSTYLE(MailStyle)
.APPENDTEXT(", kjdahdah ")
MailStyle.Bold = True
Call Body.APPENDSTYLE(MailStyle)
.APPENDTEXT("oioioiio")
MailStyle.Bold = False
Call Body.APPENDSTYLE(MailStyle)
.APPENDTEXT("http://www.google.com.br/")
.AddNewLine(2)
End With
Assunto = " meu assunto"
Destinatario = ""
Copia(2) = ""
Copia(1) = ""
' Create 'Subject Field' - replace template fields with correct values
MailField = MailDoc.APPENDITEMVALUE("Subject", Assunto)
' Create 'Send To' Field
MailField = MailDoc.APPENDITEMVALUE("SendTo", Destinatario)
'Create 'CopyTo' Field
MailField = MailDoc.APPENDITEMVALUE("CopyTo", Copia)
' Create 'Subject Field' - replace template fields with correct values
MailField = MailDoc.APPENDITEMVALUE("Subject", Assunto)
' Create 'Send To' Field
MailField = MailDoc.APPENDITEMVALUE("SendTo", Destinatario)
'Create 'CopyTo' Field
MailField = MailDoc.APPENDITEMVALUE("CopyTo", Copia)
End If
'envia o email
MailDoc.PostedDate = Now()
MailDoc.SaveMessageOnSend = True
MailDoc.Send(0)