Re: Refer original Item from new form

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Item.Parent, not Parent.

--
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" <sriramna@xxxxxxxxxxx> wrote in message news:1174897061.086741.182350@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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]"
<sue...@xxxxxxxxxxxxxxx> 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.


"sriramna" <srira...@xxxxxxxxxxx> wrote in messagenews:1174844544.964452.91520@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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?

.



Relevant Pages

  • Re: Custom Form Printing
    ... Moving the form, publishing the form, etc. will have no effect on the fields defined in the folder. ... Author of Configuring Microsoft Outlook 2003 ... Administrators, Power Users, and Developers ... need to move the custom from to another folder. ...
    (microsoft.public.outlook.program_forms)
  • Re: Form on Reply or Forward
    ... Author of Configuring Microsoft Outlook 2003 ... Administrators, Power Users, and Developers ... folder I've created under my inbox, but I'm not successful, would you please ... I then tried to set the following property on the Custom form folder ...
    (microsoft.public.outlook.program_forms)
  • Re: New Items in Folder event
    ... Author of Configuring Microsoft Outlook 2003 ... Administrators, Power Users, and Developers ... I would like to respond to new items in this folder by displaying a message ... of the task fields with information from the e-mail. ...
    (microsoft.public.office.developer.outlook.vba)
  • Re: Customizing Contact button
    ... Author of Configuring Microsoft Outlook 2003 ... Administrators, Power Users, and Developers ... > contact from a shared contact folder in public folders. ... > contact button in my form to be the shared contact folder in public folders. ...
    (microsoft.public.outlook.program_forms)
  • Re: copy custom task with custom fields
    ... Author of Configuring Microsoft Outlook 2003 ... Administrators, Power Users, and Developers ... metal coils, date of reciept, weight, production mill, mill ... I then copied (right click, copy folder, copy to "Public Folders/Jobs"). ...
    (microsoft.public.outlook)