formatting problem in copying excel sheet to mail

Copper Contributor

Hello guys, as you see in the subject I am having problem copying and pasting tables from a sheet on Excel to Gmail because it changes  the format of the tables. could someone help me please? Thank you so much guys!

 

1 Reply

@gupta_archita 

Sending mail from Excel with CDO

Dim email As CDO.Message
Dim config As CDO.Configuration
Set email = CreateObject("CDO.Message")
Set config = CreateObject("CDO.Configuration")
config.Fields(cdoSMTPAuthenticate).Value = cdoBasic
config.Fields(cdoSendUserName).Value = "email@address"
config.Fields(cdoSendPassword).Value = "Password"
config.Fields(cdoSendUsingMethod).Value = cdoSendUsingPort
config.Fields(cdoSMTPServer).Value = "SMTP Server"
config.Fields(cdoSMTPServerPort).Value = 465
config.Fields(cdoSMTPUseSSL).Value = True
config.Fields.Update
Set mail.Configuration = config
With email
.To = "email address removed for privacy reasons"
.From = "email@address"
.Subject = "Subject"
.TextBody = "Entering a text."
.send
End With
Set config = Nothing
Set email = Nothing

 

Hope I was able to help you with this info.

 

NikolinoDE

I know I don't know anything (Socrates)