A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

outlook form help



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 12th 06, 12:13 PM posted to microsoft.public.outlook.program_forms
[email protected]
external usenet poster
 
Posts: 2
Default outlook form help

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!

Ads
  #2  
Old April 12th 06, 02:00 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default outlook form help

Where is the form published? What is the state of the "send form definition with item" check box on the Properties page?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

wrote in message oups.com...
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!

  #3  
Old April 12th 06, 02:27 PM posted to microsoft.public.outlook.program_forms
[email protected]
external usenet poster
 
Posts: 2
Default outlook form help

Thanks for the reply sue,

i have published the form under personal forms libary, the status of of
" send form definition with item" is unchecked.

  #4  
Old April 13th 06, 12:48 AM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default outlook form help

So you are testing by sending messages to yourself (as the only person with access to the published form definition)?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

wrote in message oups.com...
Thanks for the reply sue,

i have published the form under personal forms libary, the status of of
" send form definition with item" is unchecked.

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook program, outlook form, local webpage form & Excel Junoon Outlook and VBA 1 April 3rd 06 06:45 AM
modify outlook form-appointment form blanc Outlook and VBA 1 March 24th 06 03:20 PM
OL2003 - can you auto-fill a singel new contact form with online form data TimR Outlook - Using Contacts 1 February 15th 06 01:43 PM
Outlook opens Form as Email message, not Form [email protected] Outlook - General Queries 2 January 26th 06 09:54 PM
I send an Outlook custom form, but a std. form displays? Sue Mosher [MVP-Outlook] Outlook - Using Forms 0 January 20th 06 07:41 PM


All times are GMT +1. The time now is 04:06 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.