Skip to main content
Announcements
Marching toward a simplified navigation! READ ON
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro (Variable retrieval in macro)

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....

1 Reply
Not applicable
Author

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