Shapeobject of MS-Word can be used to insert pictures into word documents with VBA. If I insert a small picture and blow it up to use the entire page size, it creates a cool, almost psychedelic effect.
Here's the image: Its size is 20x30 pixels, approximately the aspect ratio of an A4 document.
The function, named
main needs a parameter,
path, that points to the location of the image:
First, we declare a variable for the image (
background_image), which is a
shape), then load an image and assign it to the variable:
Then, we need to place the image's top left corner on the page's top left corner:
Finally, we want the image to be behind the text in case we're going to write on it:
This VBA program should be saved into a file, for example
backgroundImage.bas. It can then be executed with a
The resulting word (or image) then looks like