View Single Post
  #4  
Old October 6th 08, 08:16 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Issue with returnable form

In that case, to allow code to run for both senders and recipients inside
your organization, make sure you publish the form to the Organizational Forms
library with the "send form definition with item" box on the (Properties)
page always unchecked.

As for the specific code, one solution would be to forward the item back to
the original sender. You can do that with this code:

Sub btnReturn_click()
Set fwd = Item.Forward
fwd.To = "[EX:" & Item.SenderEmailAddress & "]"
If fwd.Recipients.ResolveAll Then
fwd.Send
Else
fwd.Display
End If
End Sub

If you use that approach, on the (Actions) page of the form, make sure you
set the Forward action to use the published form.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54




"Gary Newport" wrote:

I have full permission to the organisational library.

As further information, We are using Exchange 2003 with Outlook 2003 as the
client application; though the network manager is intending to move to
Outlook 2007 soon. I will, however, continue to design forms for Outlook 2003
for the foreseeable time, until the roll-out can be guaranteed as 100%
coverage and reliable. )


Hi. This is my first posting here so I thought I'd start off with a wave.
{wave} )

Okay, I am building a form as a round robin. Basically, when we have an
issue relating to a student, a relevant senior member of staff will send the
form to all relevant staff. The original form will have the student's name,
the date of return and the reason for the concern.

The receiver is to then fill out further information relevant to their area
of work and then return the form to the original source.

To simplify everything I have created a button, entitled Return Form and
named btnReturn. I have then entered the code:

sub btnReturn_click()
item.send
end sub

I cannot see how this will send the form back to the correct person but I
have even put a simple msgbox statement in the code and nothing happens. Do I
place this code in the Script window or in the VBA editor for the current
session?

Equally, I have created the compose view and the read view. So, when it is
returned, is it the read view that is viewable to the original sender?

But primarily, how do I get this button to work?

Sorry for the barrage of questions but whilst I await a new book I could do
with some serious assistance here.

Ads