I downloaded the latest version of Aspose and I have already the license too.
this is Aspose.Word family. when using Microsoft interop the size of OLE is not changing and works fine, but when using Aspose.word then the size is stretched.
Attached are the files and screenshots for both Microsoft and Aspose generated files.
my code sample is:
void tryAspose(string TemplateFile, string ExcelTemplateFile, string ReportFile)
{
AspWords.Document RepDoc;
File.Copy(TemplateFile, ReportFile, true);
RepDoc = new AspWords.Document(TemplateFile);
AspWords.NodeCollection AllShapes = RepDoc.GetChildNodes(AspWords.NodeType.Shape, true);
if (AllShapes.Count > 0)
{
foreach (Shape shp in AllShapes)
{
if (shp.OleFormat != null)
{
//Replace links whose path contains the text "_Template"
if (shp.OleFormat.SourceFullName.IndexOf("_Template", StringComparison.CurrentCultureIgnoreCase) == -1)
{
continue;
}
shp.OleFormat.SourceFullName = ExcelTemplateFile;
}
}
}
RepDoc.Save(ReportFile);
}
TestCase.zip (447.9 KB)