• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

help with outlook scripting

Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server
#1
Dear All

Really appreciate if someone can help on this. As i am very bad with Vba scripts.

Is there anyway to auto fill in the "X" in the Approve checkbox when i receive an email such as below and auto reply to the sender?

Example:
Sender: XXX@email.com.sg
==Email body start==

Mark "X" if you approve in the checkbox below
Approve ( ) Reject ( )

==Email body end==
 
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server
#3
Thanks Diane, appreciate it!

If it's not too much to ask, If i wanted to reply to the sender after replacing the body. Will the below work?

Sub SendNew (Item As Outlook.MailItem)

Dim objMsg As MailItem
Set objMsg = Application.CreateItem(olMailItem)

objMsg.Body = replace (item.body, "Accepted ( )", "Accepted (x)")
objMsg.Subject = "FW: " & Item.Subject
objMsg.Recipients.Add "XXX@email.com.sg "

objMsg.Send

End Sub
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
#4
in a rule, yes, it should work. Change Send to Display and test it - that will open it on screen so you can see.

to test the script on a selected message, use this macro:

Code:
Sub RunScript()
Dim objApp As Outlook.Application
Dim objItem As MailItem
Set objApp = Application
Set objItem = objApp.ActiveExplorer.Selection.Item(1)

'macro name you want to run goes here
SendNew objItem

End Sub
 
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server
#5
Thanks for the advice Diane.

I tried the script on my email and it works!

Appreciate the help.



Sent from my SM-G960F using Tapatalk
 

Similar threads