View Single Post
  #3  
Old March 26th 07, 09:17 AM posted to microsoft.public.outlook.program_forms
sriramna
external usenet poster
 
Posts: 12
Default Refer original Item from new form

Thanks for the tip. I presume the GetItemFromID method will need the
StoreID parameter also, since the folder could be anywhere in the
public folder tree.

So I've gotten upto here in the custom action code:

Function Item_CustomAction(ByVal myAction, ByVal myResponse)
Select Case myAction.Name
Case "Correspondence"
myResponse.BillingInformation = EntryID
myRepsonse.Mileage = Parent.StoreID
myResponse.display
Case Else
'Do nothing
End Select
End Function

This errors out with "Object Required: Parent.StoreID". Anything
wrong with the code?

The Correspondence item is based on IPM.Note and addressed like a
Reply. The originating form has been duly saved to the folder before
triggering the custom action.

--
Sriram


On Mar 26, 1:00 am, "Sue Mosher [MVP-Outlook]"
wrote:
You would need some kind of identifier. THe easiest solution might be be to have the CustomAction event handler on the task set the value of the new message's BillingInformation property to the EntryID of the original task. That way, the message form's code can get the ID from its own BillingInformation property and then use Namespace.GetItemFromID to return the message.

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



"sriramna" wrote in oglegroups.com...
I have a new email form created by a custom action in a public folder-
based form derived from IPM.Task. I need to record the plain-text
contents of the new email for reference back in the originating Task
form, just before it is sent.


It is easy enough to get a handle on the new mail form in the script
of the original Task form, but how do I do it the other way (locate
the Task item which spawned this item, from script in the email)?


The problem is that the CurrentFolder could be anything, since the
user is opening the Task Item through a hyperlink in a mail in his
Inbox. Therefore even to search the items in a folder, I will have to
find a way of locating the public folder containing the Task, in the
email script. Short of hard-coding the path, what are the options?


Ads