jfair3017
07-18-2007, 06:38 AM
Hi,
The following code in C# that used to work in office 2003 does not work anymore in office 2007. I'm trying to expand the subdocuments within a master document (oDoc). The error I receive is 'Unspecified error'.
if (oDoc.Subdocuments.Count >= 1)
{
oDoc.Subdocuments.Expanded = true;
}
I noticed when opening up the master document in Word 2007 that there is an extra step required to expand subdocuments.
From the outline view,
1) Click Show Document
2) Click Expand Sub Documents
The code works fine if the master document is saved after the show document button has been clicked. But, I'd like be to able to simulate the clicking of the Show document button programmatically.
Any ideas are appreciated.
Thanks,
John
The following code in C# that used to work in office 2003 does not work anymore in office 2007. I'm trying to expand the subdocuments within a master document (oDoc). The error I receive is 'Unspecified error'.
if (oDoc.Subdocuments.Count >= 1)
{
oDoc.Subdocuments.Expanded = true;
}
I noticed when opening up the master document in Word 2007 that there is an extra step required to expand subdocuments.
From the outline view,
1) Click Show Document
2) Click Expand Sub Documents
The code works fine if the master document is saved after the show document button has been clicked. But, I'd like be to able to simulate the clicking of the Show document button programmatically.
Any ideas are appreciated.
Thanks,
John