I was recently looking into a problem with a Document Information Panel – within Microsoft Word.
There was an error being shown as the document loaded :
Document Information Panel cannot open a new form.
The form cannot be opened. To fix this problem, contact the form designer.
Form template: http://spr/proppanel.xsn
Document Information Panel cannot open the following view: [CONTENT TYPE] Properties – Server
The following view file is not valid: view2.xsl
The .xsl file is not valid XSL.
xsl:choose must have at least one xsl:when child.
Within my SharePoint feature, I was deploying a few custom columns – one of these was a CHOICE field :
<Field ID=”{a75f81c8-a860-4967-996a-0f7941b81119}” Name=”SenderLocation” Group=”SPR Columns” DisplayName=”Sender Location” Type=”Choice” FillInChoice=”TRUE” />
This was intended for a user to add the name of a “Sender Location” – I didn’t actually know the initial choices – so I didn’t include them – but the “FillInChoice” would allow them to add values over time.
** NB. The fields works OK (in the DIP) if you don’t specify “FillInChoice” (default = false). The DIP won’t error – just no choices selectable.
Here in lies the issue – related to the fact that you have to specify the choice values.
When you create a field via the User Interface, you get an error – SharePoint Choice fields require at least one choice.
As it turns out, my CHOICE field deployed via ELEMENTS.XML didn’t have any choice values.
Thus – when Microsoft Word was trying to display from this column (within the DIP), it was error’ing.
Simple answer was to make sure it included “at least one” CHOICE value – via the UI – or via my original feature :
<Field ID=”{a75f81c8-a860-4967-996a-0f7941b81119}” Name=”SenderLocation” Group=”SPR Columns” DisplayName=”Sender Location” Type=”Choice” FillInChoice=”TRUE” >
<CHOICES>
<CHOICE>OTHER</CHOICE>
</CHOICES>
</Field>
So, if you have this error, make sure you include some values in the fieldef URL – it makes sense if you think about it.
NB. It will only error if/when the field is specified as “FillInChoice = true”
Happy SharePoint’ing !