wordpress hit counter
Welcome to OpenXML Developer Sign in | Join | Help

RichText Content Controls can't be found in OpenXML

Last post 02-09-2010, 5:06 AM by syvers. 1 replies.
Sort Posts: Previous Next
  •  02-04-2010, 7:16 AM 8106

    RichText Content Controls can't be found in OpenXML

    Hello,

    I found one interesting behavior in parsing OpenXML and finding the Content Controls. Everything works fine when we use just "text content control" - it can be found. However, nothing is found when we use "Richtext content control".

    Is it a bug?!

    I use the following code to find my content controls by tag

    List sdtList = mainPart.Document.Descendants()
    .Where(s => s.SdtProperties.GetFirstChild().Val.Value == controlName).ToList();
  •  02-09-2010, 5:06 AM 8134 in reply to 8106

    Re: RichText Content Controls can't be found in OpenXML

    Shouldn't that read

    List sdtList = mainPart.Document.Descendants()
    .Where(s => s.SdtProperties.GetFirstChild().Val.Value == controlName).ToList();

    Hope that is some help.

View as RSS news feed in XML