J
Justin.davies4
Hi,
I currently have two voting buttons approve and deny which i have setup
on the actions tab of form design and i need them to when pressed to
open a new email including all of the relevent information in email
subject and body below is my code:
Function Item_CustomAction(ByVal Action, ByVal NewItem)
const olMailItem = 0
select case Action.Name
case "Approval"
Set NewItem = Application.CreateItem(olmailitem)
item.userproperties.find("Approve") = true
Actions.Item("Approve").Enabled = True
Actions.Item("Deny").Enabled = True
NewItem.subject = "Holiday Request Approved"
NewItem.Body = "Your request from"
&(item.userproperties.find("HolidayStart"))_
& " to " & (item.userproperties.find("HolidayEnd"))_
& "for" & (item.userproperties.find("totaldays"))_
& " days leave has been approved."
NewItem.display
case "Deny"
Set NewItem = Application.CreateItem(olmailitem)
item.userproperties.find("Deny") = true
Actions.Item("Approve").Enabled = True
Actions.Item("Deny").Enabled = True
NewItem.subject "Holiday Request Denied"
NewItem.Body = "Your request from " &
(item.userproperties.find("HolidayStart"))_
& " to " & (item.userproperties.find("HolidayEnd"))_
& "for" & (item.userproperties.find("Totaldays"))_
& " days leave has been denied."
NewItem.display
end select
item.close(0)
Item_CustomAction = true
end function
basically when publishing my form and running the form the approve and
deny don't open a new email but instead just default to the
instructions on the actions tab.
this is very urgent and i would be very grateful for any help!
I currently have two voting buttons approve and deny which i have setup
on the actions tab of form design and i need them to when pressed to
open a new email including all of the relevent information in email
subject and body below is my code:
Function Item_CustomAction(ByVal Action, ByVal NewItem)
const olMailItem = 0
select case Action.Name
case "Approval"
Set NewItem = Application.CreateItem(olmailitem)
item.userproperties.find("Approve") = true
Actions.Item("Approve").Enabled = True
Actions.Item("Deny").Enabled = True
NewItem.subject = "Holiday Request Approved"
NewItem.Body = "Your request from"
&(item.userproperties.find("HolidayStart"))_
& " to " & (item.userproperties.find("HolidayEnd"))_
& "for" & (item.userproperties.find("totaldays"))_
& " days leave has been approved."
NewItem.display
case "Deny"
Set NewItem = Application.CreateItem(olmailitem)
item.userproperties.find("Deny") = true
Actions.Item("Approve").Enabled = True
Actions.Item("Deny").Enabled = True
NewItem.subject "Holiday Request Denied"
NewItem.Body = "Your request from " &
(item.userproperties.find("HolidayStart"))_
& " to " & (item.userproperties.find("HolidayEnd"))_
& "for" & (item.userproperties.find("Totaldays"))_
& " days leave has been denied."
NewItem.display
end select
item.close(0)
Item_CustomAction = true
end function
basically when publishing my form and running the form the approve and
deny don't open a new email but instead just default to the
instructions on the actions tab.
this is very urgent and i would be very grateful for any help!