Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
Please refer to the attached file,
In this I have few variables which I want to us in macro, but the macro gives an error of Object required.
Kindly help me out....
Hello Nitin,
Check below changes and then try... Below are the all the setting you will need
'SMTP server details
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "YOUR SMTP SERVER NAME"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = false
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 120
...
...
objEmail.To = ActiveDocument.Variables("varTo").GetContent.String
objEmail.Cc = ActiveDocument.Variables("varCC").GetContent.String
objEmail.From = ActiveDocument.Variables("varFrom").GetContent.String 'This could also be a variable
objEmail.Subject = ActiveDocument.Variables("varSubject").GetContent.String
objEmail.TextBody = ActiveDocument.Variables("varBody").GetContent.String
Thanks,
Robinson