The code I used to resize the image:
var shape = headerRange.InlineShapes.AddPicture(tempLogoPathName, true, true).ConvertToShape(); shape.HeightRelative = 10f; shape.WidthRelative = 40f;
Converting to Shape seems to be the solution. The previous set of different heights directly in InLineShapes caused an error. (I just edited the post and simplified the code, so it doesn't use the second dll library: Microsoft.Office.Core)
Peter source share