![]() |
| 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. |
|
|||||||
| Tags: 2007, fails, formregion, infopatheditor, outlook |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I am using the InfoPathEditor control (InfoPath 2007) in a FormRegion in
Outlook 2007 (don't ask, suffice it to say the integrated InfoPath support is not what we need). I must use the ActiveX control as Outlook 2007 does not support managed controls in the forms. I have written an addin which basically mirrors the MS article on adding formregions using an addin. When the formregion is activated for a read, I execute a LoadFromStream using a stream created using CreateStreamOnHGlobal (the same error occurs when I use a file name and use the Load method). I am doing nothing else with the form at this time except displaying it. This all works fine the first time through and forever as long as one form stays open (doesn't matter whether it is the first or one opened after the first and then closing the first one). However, if I open a message in the form (the formregion is a ReplaceAll region on IPM.Note.xyz where xyz is a dummy form name) and then close it, all further attempts to open a message in that form produce a COM error which reports that InfoPath is unable to open the form due to an error in the code (there is none in the form). The error reported by InfoPath is that "Index refers beyond end of list" which is an XML parsing error. Yes, the file is exactly the same being passed to the control's load commands. The interesting part of this is that as long as I leave a form open with the control in it, it works without error every time. I am going to cross-post this to the Outlook group since this may be an Outlook clean-up issue. |
| Ads |
|
#3
|
|||
|
|||
|
"John Guin" wrote:
First, a dumb question: does the outlook item get left showing in a reading pane? No, the form closes. Second, can you post the relevant code (I assume you are using C# with a replace region). This is a VB project. The basic code is as described in the MS samples using a class to encapsolate each form instance being added to a list upon opening and removed upon closing. The control was added to the form region via the control toolbox in Outlook. The VB variables for the control, form, and region are set to Nothing when closed (same thing occurs whether I use the InfoPathEditor.CloseDocument() method or not). Lastly, does this work on an old style forms^3 form? I don't know what you are asking here. The control works fine the first time and any subsequent times as long as there is always one of the formregions open. It is only an issue when all formregions have been closed and then an affected email is opened with the form. Something that might be a factor is that it appears that closing the form and saying you don't want to update the email prevents the email from being modified BUT the modified email is kept in memory until Outlook is closed when Outlook asks again if you want to save the modified email (this can be tested by looking at any email's header using the right-click menu on any email). Thanks, John |
|
#4
|
|||
|
|||
|
By any chance, are you leaving the item open in the preview (reading pane)?
Does it work if the reading pane is off? Feel free to shoot me an email off this list as well - johnguin@removethishotmail John "Pete Loveall" wrote: "John Guin" wrote: First, a dumb question: does the outlook item get left showing in a reading pane? No, the form closes. Second, can you post the relevant code (I assume you are using C# with a replace region). This is a VB project. The basic code is as described in the MS samples using a class to encapsolate each form instance being added to a list upon opening and removed upon closing. The control was added to the form region via the control toolbox in Outlook. The VB variables for the control, form, and region are set to Nothing when closed (same thing occurs whether I use the InfoPathEditor.CloseDocument() method or not). Lastly, does this work on an old style forms^3 form? I don't know what you are asking here. The control works fine the first time and any subsequent times as long as there is always one of the formregions open. It is only an issue when all formregions have been closed and then an affected email is opened with the form. Something that might be a factor is that it appears that closing the form and saying you don't want to update the email prevents the email from being modified BUT the modified email is kept in memory until Outlook is closed when Outlook asks again if you want to save the modified email (this can be tested by looking at any email's header using the right-click menu on any email). Thanks, John |
|
#5
|
|||
|
|||
|
The Preview pane was off. I applied the technical refresh this week and the
problem is no longer an issue. Guess they found the bug and fixed it as there was nothing changed from my end other than the application of the technical refresh. Thanks for your help. Pete Loveall "John Guin" wrote: By any chance, are you leaving the item open in the preview (reading pane)? Does it work if the reading pane is off? |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Outlook 2007 beta 2 - Instant Search Install Fails | Fred Jacobowitz | Outlook - Installation | 3 | July 16th 06 07:14 AM |
| Outlook Fails To Start 'Open' | Kahuna | Outlook - General Queries | 2 | March 16th 06 09:39 AM |
| Outlook fails to load | Cocajola | Outlook - Using Forms | 0 | March 15th 06 10:27 AM |
| Outlook Startup fails | Tomk | Outlook - Installation | 0 | March 3rd 06 04:41 PM |
| Outlook express fails to open in Win98 | Anil Bhattacharji | Outlook Express | 3 | February 4th 06 03:59 AM |