Passing item values to another form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a custom form with a command button. The click of the button opens a view of another folder populated with items based on another custom form. The view opens fine, but I would like to store the values of several fields in, perhaps, a public variable and when I close that explore, store those variable values into fields on the original custom form

I can't seem to find where to code the public variable or th4 code to store the values on selectionchange or close. Any idesa

Judy Scofield
 
VBScript doesn't provide a concept of a public variable that can be shared
between scripts (which is what you're running behind Outlook forms). Put the
data in an Outlook property or in a file. Or expand your project to a COM
addin that can actually use the SelectionChange event.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Judy Scofield said:
I have a custom form with a command button. The click of the button opens
a view of another folder populated with items based on another custom form.
The view opens fine, but I would like to store the values of several fields
in, perhaps, a public variable and when I close that explore, store those
variable values into fields on the original custom form.
I can't seem to find where to code the public variable or th4 code to
store the values on selectionchange or close. Any idesa?
 
If objItem is your Outlook item, then built-in properties are
objItem.propname and custom properties are
objItem.UserProperties("propname"). See
http://www.outlookcode.com/d/propsyntax.htm

You write data to a file either by using the SaveAs method or by creating a
file and using methods appropriate to that kind of file (Word, text, Excel,
etc.).

Yes, you can call a public method of a COM add-in from Outlook form VBScript
code. THere's information at the bottom of the
http://www.outlookcode.com/d/comaddins.htm page.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Judy Scofield said:
Ok, I'm struggling with this. How do I create or access an Outlook
property, or write the data to a file. I've never done a com addin, If I
code and compile a com addin, can that code be accessed from a command
button added to a custom form?
Judy Scofield

----- Sue Mosher [MVP-Outlook] wrote: -----

VBScript doesn't provide a concept of a public variable that can be shared
between scripts (which is what you're running behind Outlook forms). Put the
data in an Outlook property or in a file. Or expand your project to a COM
addin that can actually use the SelectionChange event.


Judy Scofield said:
I have a custom form with a command button. The click of the
button opens
a view of another folder populated with items based on another custom form.
The view opens fine, but I would like to store the values of several fields
in, perhaps, a public variable and when I close that explore, store those
variable values into fields on the original custom form. to
store the values on selectionchange or close. Any idesa?
 
Back
Top