<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Inserting Pictures using WordML</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/01/11/31462.aspx</link><description>I've seen many, many requests on the Microsoft newsgroups asking how you can insert a picture into a Word document without saving it to the file system first. This example application described in this blog illustrates both methods for inserting a picture</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>re:Inserting Pictures using WordML</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/01/11/31462.aspx#60671</link><pubDate>Mon, 01 Aug 2005 03:26:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:60671</guid><dc:creator>TrackBack</dc:creator><description>Inserting Pictures using WordMLooeess&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=60671" width="1" height="1"&gt;</description></item><item><title>re:Inserting Pictures using WordML</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/01/11/31462.aspx#57859</link><pubDate>Sun, 17 Jul 2005 07:27:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:57859</guid><dc:creator>TrackBack</dc:creator><description>Inserting Pictures using WordMLooeess&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=57859" width="1" height="1"&gt;</description></item><item><title>re:Inserting Pictures using WordML</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/01/11/31462.aspx#47394</link><pubDate>Wed, 18 May 2005 02:36:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:47394</guid><dc:creator>TrackBack</dc:creator><description>^_~,pretty good!csharpsseeoo&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=47394" width="1" height="1"&gt;</description></item><item><title>re: Inserting Pictures using WordML</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/01/11/31462.aspx#46622</link><pubDate>Thu, 12 May 2005 02:22:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:46622</guid><dc:creator>jonathangreensted</dc:creator><description>Nice.  However, the overhead for using System.XML is very large, especially for the small amount of actual XML you are generating.  You could do a lot better with a String Builder using a standard template and the Replace method.  The resizing issue is because Word embeds the picture inside of a VML bounding box, and you (and the rest of the web community) need to figure out how that works.  That is the BIG undocumented area of XML images in WordML.&lt;br&gt;&lt;br&gt;Since you are automating Word, you could also use the Clipboard to get the image into Word quickly.  &lt;br&gt;&lt;br&gt;Try this code instead:&lt;br&gt;&lt;br&gt;private void buttonInsertNormal_Click(object sender, System.EventArgs e)&lt;br&gt;{&lt;br&gt;     object oCollapseEnd = Word.WdCollapseDirection.wdCollapseEnd;&lt;br&gt;&lt;br&gt;     _wordApp.ActiveDocument.Content.Collapse(ref oCollapseEnd);&lt;br&gt;&lt;br&gt;     // Copy the Image onto the clipboard&lt;br&gt;     Clipboard.SetDataObject(pictureBox1.Image, true);&lt;br&gt;&lt;br&gt;     // Paste the image into Word&lt;br&gt;     _wordApp.Selection.Paste();&lt;br&gt;}&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=46622" width="1" height="1"&gt;</description></item><item><title>re: Inserting Pictures using WordML</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/01/11/31462.aspx#35290</link><pubDate>Tue, 08 Feb 2005 17:36:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:35290</guid><dc:creator>jonathangreensted</dc:creator><description>Nice one, Casey.&lt;br&gt;&lt;br&gt;Your article was very interesting.&lt;br&gt;&lt;br&gt;For those who didnt know CAPTCHA stands for &amp;quot;Completely Automated Public Turing test to tell Computers and Humans Apart&amp;quot;&lt;br&gt;&lt;br&gt;Please don't do this again!!!&lt;br&gt;&lt;br&gt;Jonathan&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=35290" width="1" height="1"&gt;</description></item><item><title>re:</title><link>http://msmvps.com/blogs/jonathangreensted/archive/2005/01/11/31462.aspx#34346</link><pubDate>Mon, 31 Jan 2005 00:25:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:34346</guid><dc:creator>jonathangreensted</dc:creator><description>sorry but this is comment spam from a fellow MVP.&lt;br&gt;it was posted by an automated bot i wrote.&lt;br&gt;it uses AI to beat the CAPTCHA test.&lt;br&gt;i have written an article about it here.&lt;br&gt;&lt;a target="_new" href="http://www.brains-N-brawn.com/aiCAPTCHA"&gt;http://www.brains-N-brawn.com/aiCAPTCHA&lt;/a&gt;&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=34346" width="1" height="1"&gt;</description></item></channel></rss>