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

My Form Pages are not getting hidden



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 6th 06, 05:03 PM posted to microsoft.public.outlook.program_forms
lalthan
external usenet poster
 
Posts: 5
Default My Form Pages are not getting hidden

I have created a mail form with 4 pages. Now, by default I have hidden
all the forms except for the default mail page. As per the value
selected by the user, these form pages were populated.
I wrote a script using either one of the two mentioned below:
Sub Item_CustomPropertyChange(ByVal Name)
Function Item_Send()

Now, as per the value I select from the Dropdown box, only the
concerned Form Page becomes visible. But when I send it out, the
recipient receives only the first page (ie. Mail page) and not the
other visible page.

I rerun the whole thing in the opposite way. This time, I made all the
pages visible and as per my dropdown value, all the other Form Page
becomes hidden. This works for me but when I send it out again, the
recipient receives the form with all the four pages visible.

Any idea why the same view that I get is not received by the recipient
? I have not set a separate READ page for the other Pages except the
Mail Page.

Ads
  #2  
Old November 6th 06, 08:15 PM posted to microsoft.public.outlook.program_forms
Hollis Paul
external usenet poster
 
Posts: 242
Default My Form Pages are not getting hidden

In article .com,
Lalthan wrote:
I rerun the whole thing in the opposite way. This time, I made all the
pages visible and as per my dropdown value, all the other Form Page
becomes hidden. This works for me but when I send it out again, the
recipient receives the form with all the four pages visible.

Did you save the list-value of the drop-down control to an Array type
Outlook variable, and the index-value to a numeric type Outlook
variable?

Do you re-load and initialize the drop-down control when it is opened in
read mode?

--
Hollis Paul
Mukilteo, WA USA


  #3  
Old November 7th 06, 12:55 PM posted to microsoft.public.outlook.program_forms
lalthan
external usenet poster
 
Posts: 5
Default My Form Pages are not getting hidden

The code I use is as below:

Function Item_Open()
MyValue = item.UserProperties("request")
Set myInspector = Item.GetInspector
Set myPages = myInspector.ModifiedFormPages
If MyValue "" Then
If MyValue = "1" Then
myInspector.ShowFormPage("1")
myInspector.HideFormPage("2")
myInspector.HideFormPage("3")
myInspector.HideFormPage("4")
ElseIf MyValue = "2" Then
myInspector.ShowFormPage("2")
myInspector.HideFormPage("1")
myInspector.HideFormPage("3")
myInspector.HideFormPage("4")
ElseIf MyValue = "3" Then
myInspector.ShowFormPage("3")
myInspector.HideFormPage("1")
myInspector.HideFormPage("2")
myInspector.HideFormPage("4")
ElseIf MyValue = "4" Then
myInspector.ShowFormPage("4")
myInspector.HideFormPage("1")
myInspector.HideFormPage("2")
myInspector.HideFormPage("3")
Else
myInspector.ShowFormPage("1")
myInspector.ShowFormPage("2")
myInspector.ShowFormPage("3")
myInspector.ShowFormPage("4")
End If
End If
End Function

Now, the recipient is still seeing all 4 pages. Also, on Reply by the
recipient, the form is lost. The form is still attached only if the
recipient forwards it back to the original sender or forwards it to
another person.

I have also tried the Sub Item_CustomPropertyChange(ByVal Name) and
added the above code, but the same is working only for the original
sender.

  #4  
Old November 7th 06, 06:13 PM posted to microsoft.public.outlook.program_forms
Hollis Paul
external usenet poster
 
Posts: 242
Default My Form Pages are not getting hidden

In article .com,
Lalthan wrote:
Now, the recipient is still seeing all 4 pages. Also, on Reply by the
recipient, the form is lost. The form is still attached only if the
recipient forwards it back to the original sender or forwards it to
another person.

I have also tried the Sub Item_CustomPropertyChange(ByVal Name) and
added the above code, but the same is working only for the original
sender.

What you are not showing is how you save a value to
item.UserProperties("request"). From your description of the pages
that are seen, I infer that there is no value in
item.UserProperties("request") and the code is falling into the else
clause.

Other questions that have not been addressed:
Where is the form published?
Does the recipient have access to it?

--
Hollis Paul
Mukilteo, WA USA


  #5  
Old November 7th 06, 07:24 PM posted to microsoft.public.outlook.program_forms
lalthan
external usenet poster
 
Posts: 5
Default My Form Pages are not getting hidden

What you are not showing is how you save a value to
item.UserProperties("request"). From your description of the pages
that are seen, I infer that there is no value in
item.UserProperties("request") and the code is falling into the else
clause.

request is the value of the dropdown assigned for the
combobox (name - combobox1). On the properties page for Combobox1, on
the value tab, I have assigned a new field named "request"
(Property to use As Value)

Where is the form published?

The Form is published on a public folder

Does the recipient have access to it?

The recipients have access to this folder.

Also, when I send a reply mail from the recipient, the form does not
get displayed. The form gets displayed only if I forward it again from
the recipient to another user.

  #6  
Old November 7th 06, 08:31 PM posted to microsoft.public.outlook.program_forms
Hollis Paul
external usenet poster
 
Posts: 242
Default My Form Pages are not getting hidden

In article . com,
Lalthan wrote:
Where is the form published?

The Form is published on a public folder

Does the recipient have access to it?

The recipients have access to this folder.

Also, when I send a reply mail from the recipient, the form does not
get displayed. The form gets displayed only if I forward it again from
the recipient to another user.

Well, unless you have code in the Item-open event to add a new instance
of your custom message and then add the contents of the incoming message
to it, your recipients will probably never see it displayed in the
custom form. Exchange/Outlook will look for the custom form first in
the Exchange Organizational Forms library, then in the local cache, and
then in the personal forms library, if it exists. It does not search
through public folders to find the custom form. The solution is to move
the form definition from the public folder to the Exchange Org Forms
Library. Your recipients will then be able to find the custom form.

Now, back to "request". From what you have said, I infer that the text
of what is selected in the drop-down list is getting saved to the
variable you created. This will not evaluate to a numerical value when
you try to use it in your code. What you need to do is create two
custom fields, one of type array, and one of type numeric. You need to
save the Array value of the combo-box to the field of type array, and
the index value of the combo-box to the numeric-type field. The
Combo-box should be set as unbound, and you have to provide the code, in
the click-event handler, to save to save these two values. Then, when
the item is opened at the recipient, you need to provide code to
reconstruct the state of the combo-box from the saved fields.

Review these pages for sample code and how-to information:

Syntax for Microsoft Outlook property and control values and events
5/10/2006
Correct syntax for accessing Microsoft Outlook property and control
values and writing events that respond to changes in properties or
control values
http://www.outlookcode.com/archive0/d/propsyntax.htm - 31 KB

To populate a combo box on a Microsoft Outlook form 5/10/2006
Microsoft Outlook VBScript code sample to populate a combo or list box
on an Outlook form using an ADO disconnected recordset
http://www.outlookcode.com/d/code/popcombobox.htm - 20 KB

Controls on Microsoft Outlook Custom Forms 5/10/2006
Tips, tricks and other resources for using controls on Microsoft
Outlook forms
http://www.outlookcode.com/d/formcontrols.htm - 35 KB

--
Hollis Paul
Mukilteo, WA USA


  #7  
Old November 8th 06, 05:42 AM posted to microsoft.public.outlook.program_forms
lalthan
external usenet poster
 
Posts: 5
Default My Form Pages are not getting hidden

Dear Hollis,

Thanks very much for such an exhaustive explanation. Now, my only
problem is how to set create two
custom fields, one of type array, and one of type numeric. Can you show
me a few example while I go through the syntax from www.outlookcode.com


Thanks

  #8  
Old November 8th 06, 06:45 AM posted to microsoft.public.outlook.program_forms
lalthan
external usenet poster
 
Posts: 5
Default My Form Pages are not getting hidden

Just to add to the below field, I don't think I have any unbound field.


lalthan wrote:
Dear Hollis,

Thanks very much for such an exhaustive explanation. Now, my only
problem is how to set create two
custom fields, one of type array, and one of type numeric. Can you show
me a few example while I go through the syntax from www.outlookcode.com


Thanks


  #9  
Old November 8th 06, 05:02 PM posted to microsoft.public.outlook.program_forms
Hollis Paul
external usenet poster
 
Posts: 242
Default My Form Pages are not getting hidden

In article .com,
Lalthan wrote:
Just to add to the below field, I don't think I have any unbound field.

Of course not. Unbound refers only to controls, which are unbound, or
bound to fields. What that means is the following:
A bound control has no click event available to the programmer. The
click event really does happen but it is consumed by the code that was
set up when the control was bound to the field. You don't see that code,
but it is there, somewhere. When you hit enter on a bound control, the
value of the control is automatically transferred to field that is bound
to the control. This does not happen with an unbound control. When you
hit enter with an unbound control, like a button, processing control is
switched to a click-event handler. You can then put any code you like
into the click-event and do a lot of things. But, if you do not also
save the value of the control to a field, it is lost when the form is
closed.

--
Hollis Paul
Mukilteo, WA USA


  #10  
Old November 8th 06, 05:02 PM posted to microsoft.public.outlook.program_forms
Hollis Paul
external usenet poster
 
Posts: 242
Default My Form Pages are not getting hidden

In article .com,
Lalthan wrote:
Now, my only
problem is how to set create two
custom fields, one of type array, and one of type numeric. Can you show
me a few example while I go through the syntax from www.outlookcode.com


You do not really want to create a field using code. Just click the
field chooser control, click the new button, choose the User Defined
Field in the Folder category, then create a control. You will be forced
to select a type for the field--choose the one that sounds like an array
for one, and numeric for the other.

--
Hollis Paul
Mukilteo, WA USA


 




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
Changing the order of pages on a custom Outlook form Geist Outlook - Using Forms 1 July 14th 06 10:19 PM
Do not display other pages when form is sent [email protected] Outlook - General Queries 1 April 26th 06 11:53 PM
How do I remove pages from a form [other than first page]? George Kirby Outlook - Using Forms 1 March 8th 06 12:55 AM
Create more pages on a form Frank Fernandez Outlook - Using Forms 1 February 15th 06 08:09 PM
Outlook Form - Hidden Label [email protected] Outlook - General Queries 1 January 17th 06 05:36 PM


All times are GMT +1. The time now is 11:17 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.