Hello every one! I am making a replace text into .docx file, but I need to access the shapes like "checkboxs", these are into a table. When I read the template.Tables[1].Rows[0].Cells[0].Pictures, the last object give me the next exception: System.NullReferenceException
I can not undertund why, I need change this shapes/pictures on my replace process:
This is my code:
private static DocX CreateInvoiceFromTemplate(DocX template)
{
var tables = template.Tables;
var dataRepository = DataDocumentRepository.Instance;
template.ReplaceText("{EmployerName}", "PABLO H");
var pics = template.Tables[1].Rows[0].Cells[0].Pictures;
template.ReplaceText("{DateImplemented}", DateTime.Now.ToString("yyyy/MM/dd"));
return template;
}
Hello every one! I am making a replace text into .docx file, but I need to access the shapes like "checkboxs", these are into a table. When I read the template.Tables[1].Rows[0].Cells[0].Pictures, the last object give me the next exception: System.NullReferenceException
I can not undertund why, I need change this shapes/pictures on my replace process:
This is my code: