Closed dgwaldo closed 4 years ago
I pulled the code local and ran it. Ran into the same issue where VS2019 can't open the project or solution file. I copied everything into a new solution and applied this fix... Looks like it just needed to include SdtCell as a valid element. Our templates are heavy on the tables...
/// <summary>
/// Verifies if this element is a content control
/// </summary>
public static bool IsContentControl(this OpenXmlElement e)
{
return e is SdtBlock || e is SdtRun || e is SdtCell;
}
That's a good find, thank you for the contribution!
We've ran into a little problem after upgrading our code... Our templates are made in Word 2013 and are docx.
Handler is implemented as follows. After getting this error I attempted a few things. I tried with multiple document templates, and I tried using the TemplateDocument() class with a hard coded path.