Excel - Codigo para enviar hipervinculo reducido en email desde excel CDO

 
Vista:

Codigo para enviar hipervinculo reducido en email desde excel CDO

Publicado por sebastian (1 intervención) el 16/01/2021 20:48:27
Hola,


Necesito ayuda para poner un código en una macro para enviar email de gmail.

Funciona todo bien, pero necesito insertar un hipervinculo de una pag web. El problema es que si lo pongo como texto en el cuerpo del correo (en Msg) se copia toda la dirección muy larga y el email no se ve muy "limpio". Abría algún código para convertir ese texto en un texto hipervinculo reducido, por ejemplo "Click Aquí"?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Set MiCorreo = New CDO.Message
'
With MiCorreo.Configuration.Fields
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'cdoBasic
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'cdoSendUsingPort
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "xxxx@gmail.com"
    .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xxxxx"
    .Update
End With
'
'Elementos del correo
'
Asunto = "Texto"
Destinatario = Celda.Offset(0, -1).Value
Correo = Celda.Value
Adjunto = Celda.Offset(0, 1).Value
'
 
'
Msg = "Hola " & Destinatario & vbNewLine & vbNewLine
Msg = Msg & "Texto" & vbNewLine & vbNewLine
Msg = Msg & "hipervinculo" & vbNewLine
 
'



Gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder