![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hi,
I designed a form in outlook using the post template and added the following code: Function Item_Open() IntAns=MsgBox("Would you like to open a new account",_ vbQuestion+vbYesNo,"Account Request") If IntAns=vbYes then Set myInspector=Item.GetInspector Set myPage=myInspector.ModifiedFormPages.Item("CusNum" ) Set fraOpen=myPage.Controls.Item("fraOpen") fraOpen.Visible=True End If If IntAns=vbNo Then Set myInspector=Item.GetInspector Set myPage=myInspector.ModifiedFormPages.Item("CusNum" ) Set fraChange=myPage.Controls.Item("fraChange") fraChange.Visible=True End If End Function The problem I'm facing are on two levels. First when I work with the form in my laptop it works fine however none of the frames show on the read layout portion when posted. Secondly, I re-created the exact form in my computer at work and when I try to run the form it crashes Outlook (closes and restarts itself) when you attempt to Post. The code runs well on both environments, it's just when you post or attempt to post that the form exhibits these quirks. All I would like to do is ask the question during the composing layout and show the results on the read layout. Any recommendations would be greatly appreciated. Thank you. Jade |
#2
|
|||
|
|||
![]()
Did you create a read layout with the frames? Where is the form published? What version of Outlook?
-- 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 "Jade" wrote in message oups.com... Hi, I designed a form in outlook using the post template and added the following code: Function Item_Open() IntAns=MsgBox("Would you like to open a new account",_ vbQuestion+vbYesNo,"Account Request") If IntAns=vbYes then Set myInspector=Item.GetInspector Set myPage=myInspector.ModifiedFormPages.Item("CusNum" ) Set fraOpen=myPage.Controls.Item("fraOpen") fraOpen.Visible=True End If If IntAns=vbNo Then Set myInspector=Item.GetInspector Set myPage=myInspector.ModifiedFormPages.Item("CusNum" ) Set fraChange=myPage.Controls.Item("fraChange") fraChange.Visible=True End If End Function The problem I'm facing are on two levels. First when I work with the form in my laptop it works fine however none of the frames show on the read layout portion when posted. Secondly, I re-created the exact form in my computer at work and when I try to run the form it crashes Outlook (closes and restarts itself) when you attempt to Post. The code runs well on both environments, it's just when you post or attempt to post that the form exhibits these quirks. All I would like to do is ask the question during the composing layout and show the results on the read layout. Any recommendations would be greatly appreciated. Thank you. Jade |
#3
|
|||
|
|||
![]()
Hi Sue,
Wow...it's a pleasure meeting you in this usergroup. I've been reading your book for guidance in this project. I've run into a bit of a loop. I realize that I'm either missing a step or am not using the proper step. The form wasn't published but in design mode at the time and yes I created a Read Layout which has a slightly different layout but all of the fields in the Compose Layout. I recently published it to my Personal Library and realize that I have another problem. I believe it's one-off...... The script itself should only run when the form is in compose layout. However, now that I've published it...whenever I post a new form and go back to open the original form the message box appears prompting me for a new form. Perhaps Function_Item Open() is not the function I require. The manner in which the whole process should run would be that the form message box appears upon initial opening then once it's posted the Read Layout is slightly a different layout and can be forwarded to other people. Basically the script should only work upon initial activation. I'm working with Outlook 2003. I truly appreciate any assistance you can offer. Jade |
#4
|
|||
|
|||
![]()
Item_Open fires whenever you open an item, regardless of whether it's a new item or a previously created one. Check the Size property to determine which you have. A new item will have Item.Size = 0.
The manner in which the whole process should run would be that the form message box appears upon initial opening then once it's posted the Read Layout is slightly a different layout and can be forwarded to other people. I don't understand what you have in mind. A layout isn't what you forward. What's forwarded is the item, in other words the data. If you want to control the UI of the item the user receives, that item is going to need to be using a custom form definition that has code behind it to set the UI when the recipient opens the item, based on some state data that you store in the item. And that means it will need to be published to the Organizational Forms library. I also don't understand why you're using a post form when what you seem to want to create a message to recipients. What part of the "big picture" are we missing? -- 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 "Jade" wrote in message oups.com... Hi Sue, Wow...it's a pleasure meeting you in this usergroup. I've been reading your book for guidance in this project. I've run into a bit of a loop. I realize that I'm either missing a step or am not using the proper step. The form wasn't published but in design mode at the time and yes I created a Read Layout which has a slightly different layout but all of the fields in the Compose Layout. I recently published it to my Personal Library and realize that I have another problem. I believe it's one-off...... The script itself should only run when the form is in compose layout. However, now that I've published it...whenever I post a new form and go back to open the original form the message box appears prompting me for a new form. Perhaps Function_Item Open() is not the function I require. The manner in which the whole process should run would be that the form message box appears upon initial opening then once it's posted the Read Layout is slightly a different layout and can be forwarded to other people. Basically the script should only work upon initial activation. I'm working with Outlook 2003. "Sue Mosher [MVP-Outlook]" wrote in message ... Did you create a read layout with the frames? Where is the form published? What version of Outlook? -- 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 "Jade" wrote in message oups.com... Hi, I designed a form in outlook using the post template and added the following code: Function Item_Open() IntAns=MsgBox("Would you like to open a new account",_ vbQuestion+vbYesNo,"Account Request") If IntAns=vbYes then Set myInspector=Item.GetInspector Set myPage=myInspector.ModifiedFormPages.Item("CusNum" ) Set fraOpen=myPage.Controls.Item("fraOpen") fraOpen.Visible=True End If If IntAns=vbNo Then Set myInspector=Item.GetInspector Set myPage=myInspector.ModifiedFormPages.Item("CusNum" ) Set fraChange=myPage.Controls.Item("fraChange") fraChange.Visible=True End If End Function The problem I'm facing are on two levels. First when I work with the form in my laptop it works fine however none of the frames show on the read layout portion when posted. Secondly, I re-created the exact form in my computer at work and when I try to run the form it crashes Outlook (closes and restarts itself) when you attempt to Post. The code runs well on both environments, it's just when you post or attempt to post that the form exhibits these quirks. All I would like to do is ask the question during the composing layout and show the results on the read layout. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook program, outlook form, local webpage form & Excel | Junoon | Outlook and VBA | 1 | April 3rd 06 06:45 AM |
issue with opening form | sele | Outlook - Using Forms | 1 | March 24th 06 01:29 PM |
Default Email template/form issue | BearTrap3 | Outlook - Using Forms | 3 | February 24th 06 09:50 PM |
Having an issue with Check Full Name form | Bo | Outlook - Using Contacts | 1 | February 24th 06 01:20 PM |
I send an Outlook custom form, but a std. form displays? | Sue Mosher [MVP-Outlook] | Outlook - Using Forms | 0 | January 20th 06 07:41 PM |