Macros created by me, unless otherwise specified.
Info:
-
Automatically embeds images in the place of image links
-
Can be re-run over cells to "fill in gaps" non-destructively
-
Works with URLs not ending in image extension, e.g, discord image link with token query param
-
If you add rows/columns around imported images, the embedded images move automatically
-
Saves the image with the document, instead of links which can go down
-
WARNING: No undo available! Duplicate your file before proceeding
-
Original source: by kresty @ https://superuser.com/a/1404121
-
Reworked by me:
-
Images are no longer stretched to fill cell - now preserves aspect ratio
-
Images are now properly resized to fit perfectly inside cell
-
Images are centered in the cell if smaller than the cell
-
Macro executes on currently selected cells, rather than having to manually specify range every time
-
Code cleaned up and commented
-
-
Example before:
LFRD 2025 Bus Previews - B4 - With Hyperlink.xlsm
-
Example after:
LFRD 2025 Bus Previews.xlsm
-
Search the contents of currently selected cell with Google / Google Images / Flickr
-
Created by Booksticle, unmodified in this repository (except adding PtrSafe to ShellExecute declaration for 64-bit operation)
-
Example included in
LFRD 2025 Bus Previews.xlsm
🛠 Setup Guide
-
Developer > Visual Basic
-
Modules > Module1 (in tree on left side)
-
Paste (Declarations).vba in Declarations section:
-
Tools > Macros
-
Under Macro Name type either
FlickrIt
/GoogleIt
/GoogleImagesIt
then click Create to create new macro section for the relevant function -
New section with Sub skeleton will be created. Replace entire contents of this section with the contents of the relevant .vba containing the function's code
-
Save and close VBA Editor
-
Developer > Macros > Select macro you want to assign keyboard shortcut to > Options
-
Type a single key into shortcut box, e.g, G for CTRL+G. For CTRL+SHIFT+G, delete contents of box and type Shift+G (NOT Ctrl+Shift+G). Nothing else will work.
-
Click OK
💼 Archived macros
None-
File > Print > Page Setup
-
Scaling > Fit To > 1 pages wide by 1 tall
-
OK
-
Select Portrait/Landscape as appropriate
-
Print
Normal File > Print will not work - you need to use Export.
-
First, Print to PDF with above instructions to save print layout
-
Then, File > Export > Create PDF/XPS document
(Macros & resources)
Booksticle - Assorted macros, shortcuts, Excel guides