Wednesday, June 21, 2006 7:37 PM
I am new to vsto 2005, and have a few questions.
1- is task pane and action pane the same thing ?
2- in creating a word project , I can do :this.ActionsPane.Controls.Add(new UserControl1());
is there only one actionpane for a word document, ? can we add more and how ?
3- what is the difference of usercontrol v.s. actionspanecontrol ?
Wednesday, June 21, 2006 8:03 PM
The ActionsPane item is the same as a UserControl item. The reason we added the ActionsPane item was for discoverability/visibility reasons.
Yes, both lines of code will work.
Yes, there's only one ActionsPane per document in VSTO 2005. In Office12 and VSTO v3 you will be able to have multiple per document! Stay tuned! :-)
Thursday, June 22, 2006 12:26 AM
so , I had a version of VSTO 2005 and I had VSTO v3 June CTP at the same time , so it was confusing, ant took the VSTO 2005 out . , but I found out that the office projects could not be created , it was missing some class.. ?
therefore, I am working with the latest I assume..but a bit confusing..
Before, I get into the VSTO , I had an existing development on infopath 2003 that was working with Visual Studio 2003 and later with 2005, without the VSTO.
Now that I have this infopath application, I want to take advantage of the VSTO v3 and create custom task panes,
I know that in infopath 2003 we had only one taskpanes which was accessible , taskpanes[1-8] was referencing the exisitng taskpanes such as home, find, etc. ? is this right, ?
now If I want to create customtaskpanes, I saw an example that I was able to create this via Addin.
However, there is another type of project in vsto that should allow me to create an infopath project that should allow me to do create custom task panes as well,
When I do that, it asks me if I want to use an existing infopath template, which I do , but when the project is opened, I do not see any of my previous codes ? ,, and If I have to start over, it seems that I do not have all the right references ??
Is there an example for infopath and VSTO , and Customtaskpanes ?
Thursday, June 22, 2006 8:52 AM
I'm surprised that things continued to work after uninstalling VSTO2005. The VSTO v3 June CTP is supposed to be installed on top of VSTO2005. Some of the problems you're seeing might be because of that. I'd recommend installing VSTO2005 again and then installing the VSTO v3 June CTP after that.
Unlike the ActionsPane, CustomTaskPanes are application level and can be created via the VSTO v3 CTP add-in projects. So you should create an InfoPath add-in project (not an InfoPath doc level project).
There's a brief demo you can watch here: http://blogs.msdn.com/vsto2/ that shows how to create custom task panes.
There's also some documentation about the custom task pane in the following VSTO v3 tutorial: http://download.microsoft.com/download/5/5/8/55826AC5-FF9A-461D-ABC3-477E9D1829A7/VSTOv3CTPTutorial.doc
Hope that helps!
Thursday, June 22, 2006 5:17 PM
I did put VSTO v3 over VSTO2005 ,still some unanswered questions:
I am confused as to how to proceed with my infopath development with VSTO,
there are 2 ways to write code for infopath :
a-without VSTO b- With VSTO
Question 1- I have existing code that was written for infopath without VSTO ,
when I try to now create an infopath template with VSTO using the existing project, I loose the form code ?
Question 2- with VSTO , instead, I get the following in the form code:public partial class FormCode public void InternalStartup()
Even when I bring my oldcode and fix all the references which was lost while bringing in to VSTO , I still get errors from the manifest..
Thursday, June 22, 2006 6:03 PM
Just to make sure we're on the same page, it sounds like you wrote your old code using InfoPath 2003 with the Visual Studio 2003 Toolkit found here:
And now you've installed the Visual Studio 2005 Toolkit that comes with VSTO 2005, found here:
And finally you installed VSTO v3, as found here:
Including the InfoPath piece which is included here:
To Question 1:
You should be able to double click your solution file to open it in VS, and all your code should remain there. If you create a new InfoPath project instead and then point to the old project, we'll copy the form but not the code.
To Question 2:
Once you open the solution directly, your code should just work.
Thursday, June 22, 2006 6:57 PM
I am finding that when you create an infopath template with VSTO , you have a whole bunch of differences in the way the events are handled, and organized, like before, I had control_Onafterchange(), and now we have control_Changed().
I am trying to take advantage of the VSTO ? is there any if I convert my code to the new format ??
Thursday, June 22, 2006 7:11 PM
That's the new object model for InfoPath 2007, but the old object model is still supported.
Go to the "Form Options" dialog (it should be on the Tools menu) and change the language to the C# or Visual Basic language with "(2003 compatible)" on it.
Then get your code working again and if you want to upgrade it to the new OM you can click the Upgrade button in the same Form Options location.
Thursday, June 22, 2006 7:43 PM
I did the conversion on my previously working project .
now everywhere there was code , I have this:
am I supposed to set this, or should it be a setting in the infopath ?
Thursday, June 22, 2006 8:45 PMThis is set by InfoPath, but it is always false and only there as a way to comment out your old code. You need to copy all your code to the new event handlers and rewrite it to work with the new object model. What upgrade did was hook up the same event handlers for you can just update the code you wrote without having to update the code InfoPath had automatically generated for you.
Thursday, June 22, 2006 9:09 PM
I found the following blog that has some tips but no where near what has to change ..
can you provide me with a complete list, ?
here is a number of unique errors that I could get help on:
'EmailAdapter' could not be found'
'DAVAdapter' could not be found
WebServiceAdapter2' could not be found
IXMLDOMNodelist could not be found
Thursday, June 22, 2006 9:16 PM
Cool, glad you found that since I actually wrote that blog entry.
Unfortunately our full documentation isn't ready yet, so I recommend using the old object model for now. You don't need to upgrade your OM to work with InfoPath 2007. You only need to upgrade it if you want to run your form in the browser using the Microsoft Office SharePoint Server.
If you must update your code, your best bet is to use the Object Browser in VS and find the closest matches.
Thursday, June 22, 2006 9:52 PM
That is the main reason , I want to change it..
can you provide conversions for :
Thursday, June 22, 2006 10:12 PMIt doesn't map over all so simply. I'm sorry the docs aren't ready yet, so I'll say what I can here, but I can't help much more than this.
thisXDocument.View.SwitchView = ViewInfos.SwitchView
thisXDocument.UI.Alert = Windows.Forms.MessageBox
(Note that this doesn't work in browser forms so you'll want to use conditional formatting instead to show/hide messages, there's no code way to show dialog boxes from the server)
IXMLDOMDocument3 = System.Xml.XPathNavigator
(the old MSXML concepts are replaced by System.Xml, so this is where you'll have to do the most rewriting of your code)
thisXDocument.DOM.SelectSingleNode = MainDataSource.CreateNavigator().SelectSingleNode(xpath, NamespaceManager);
(this is in my blog entry)
Thursday, June 22, 2006 10:45 PM
thanks a lot that reduced my errors quite a bit,
I am going to list the rest, so , if you do have a chance i appreciate the response.
Monday, June 26, 2006 9:55 PM
thisXDocument.GetDOM("NAME") = XmlForm.DataSources("NAME").CreateNavigator()
thisXDocuement.DataObjects = XmlForm.DataSources
Hope that helps!