![]() |
#1 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Mar 2014
Location: In my dreams
Device: iPad 2
|
Macro to save pictures from Word 2010
Hi guys,
I would like to ask if someone has or is capable of writing a simple macro that would take a picture from Word document and save it in the same folder where the document is and with the same name. I know that Word 2010 has the possibility of saving the picture via context menu but it doesn't seems to remember the saving location so every time I do this I need to choose the path again and write the name. You might think I am too lazy but if you do this for every .doc ebook to convert it into .epub it's real pain in the a*se. So ideally it should work like this: I open the document .doc, click the picture, start macro, and macro saves the picture to the folder where the document is with the same name as the document a than delete the picture. Hope you understand me and I don't waste you time. Thanks a lot |
![]() |
![]() |
![]() |
#2 |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Sorry, but:
why don't you just "save as...filtered HTML" and use the instantly-created folder of images that comes along with the HTML file, which is pretty much exactly what you just asked for? No macro, no muss, no fuss, no hassle? Hitch |
![]() |
![]() |
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Hitch is right. Although the option to save pictures from Word is now possible by right-clicking on them, this functionality is not ported to VBA or .NET. So, it is not possible to do with macro's or programming.
The best option would be to retreive the original pictures, since Word does some manhandling of pictures which lowers the quality. If that is not possible, you are best of saving as (filtered) HTML and have all the pictures neatly in the appropiate folder. Another option is to copy the picture and past it into a image editor and the last option is to grab the image from the word document and put it in a bitmap element in a macro/program and save that one. However, that has also several issues. I investigated this issue at length in the past for both my macro and my program. In the end I never got it fully to work in a macro. The save as (filtered) HTML is your best option. |
![]() |
![]() |
![]() |
#4 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
BUT, that's just my $.02. Hitch |
|
![]() |
![]() |
![]() |
#5 | |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Mar 2014
Location: In my dreams
Device: iPad 2
|
Quote:
I do it like this: get a .doc document containing book itself and cover picture. I save the picture so I can later use it as cover picture in calibre and then use a macro that saves the document as .rtf. Rtf documents then upload to calibre, convert to epub and add the extracted cover picture. And the process of extracting picturec takes the longest time. And since I have a lot of books in .doc (Perry Rhodan series) it takes a lot of time. So there is really no way of using macros to save pictures from document? Or is there any better way to do what I described earlier? I learned it myself so it's probably not the fastest way or the smartest way but it worked so far for me. |
|
![]() |
![]() |
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
What I described are the only ways, sorry about that. They haven't opened up the 'save picture' api yet like I said. Nor in VBA, nor in .NET.
You could also open the .docx in for example 7-zip and extract the images. |
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Mar 2014
Location: In my dreams
Device: iPad 2
|
Hope they will make that option available... But thank you for your time
|
![]() |
![]() |
![]() |
#8 |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
![]() |
![]() |
![]() |
#10 |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word macro for clean HTML code | Toxaris | ePub | 135 | 02-28-2015 02:21 AM |
Word Macro: Footnotes to inline text ? | Hadrien | Workshop | 17 | 10-08-2011 01:28 PM |
Word 2007 macro | scoplar | Workshop | 1 | 05-21-2011 05:00 AM |
Doc to REB Macro for Word | kbirdz | Fictionwise eBookwise | 0 | 10-27-2010 10:30 PM |
Word Formatting Macro (Stingo's Macro) | Stingo | Sony Reader | 75 | 08-24-2010 05:18 AM |