![]() Hi GuiLinKwekWord has no built-in functionality for connecting with PictureBox control on a Windows Form (I assume that's what you're referring to).Using Word's automation interface your only possibility would be to COPY the picture to the Clipboard, then your code would need to retrieve it from the Clipboard and paste it into the PictureBox (assuming the control would support that).The other possibility would involve working with the Word Open XML in the document Zip package, meaning the document would have to be closed, not open in Word. ![]() If the pictures are static, you might consider adding an Image control for each one, then simply changingthe zOrder according to the user's selection via a listbox/combobox.CheersPaul EdsteinMS MVP - Word. To load a picture into an Image control at runtime, you need to use the LoadPicture method, which requires the picture's filename & path. Unless it's a linked picture, a picture in a document doesn't have a filename & path of its own.If it's a linked picture, it's easy enough to retrieve the filename & path of the source file the process is the same for Shapes and InlineShapes. There's also a Shape collection.Cindy Meister, VSTO/Word MVP. ![]() The Range.WordOpenXML property could theoretically give you the image information aspart of the OPC flat file package it returns, probably as base 64, but you'd have to test it.Please also note that not all graphics content is formatted as an InlineShape.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |