I've been trying for several hours to get this to work, but all I want to do is change a few pictures in a document based on their tag or title. I've tried using this code here:
http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2011/03/28/131867.aspx
but, doesn't seem to work for multiple content controls.
I've setup a class like so:
namespace updateDocument { class ReplaceImager { public static void ReplaceImage(WordprocessingDocument docFile, string map, string maptag) { } } }
So, I'll send the document the file where the new image is and the map tag to this, but I don't know what to write to change the content control image with the one I'm sending it in the map string?
Hi Weston,
Please look at this thread,
openxmldeveloper.org/.../158527.aspx
Thanks for this. When the image is inserted it seems to only take up half of the page? and I don't know how to push the extent out to cover the full page?
Hi,
Since the sample images were of that size, it was taking only half a page. If the image of larger size then it will fit in entire page. Are you looking every image fit entire page?
Thanks I found where to change the extent, so it filled the whole page out...
It was these bits that set the extent of the image:
5872489L
8305800L
and apparently if you divide the values by 9525 you get the pixel value.