Hello,
I have a word template/form that users need to place photos into (numerous photos). Each photo has to be formatted to particular dimensions. I placed a “Picture Content Control” into the template which allows the user to select a source photo with a single click. This process brings in a photo at the preset size. The Picture Content Control is in an external file, which is called into the template by macro. Currently, the user clicks an embedded macro button from the template to call in a table holding the Picture Content Control. I would like to instead, have the user press an embedded macro which will collect all of the photos they have in a photo directory, inserting a picture content control and a photo based on how many photos they have total.
So for example. If the user has 10 photos, and they place all 10 photos into a child folder named “Photos”, when they activate the macro, the following occurs:
1. A second Macro is called to insert a table and a Picture Content Control from an external file: the Picture Content Control is activated and Photo1 is selected.
2. If there is a second photo (Photo1[+1]), the macro (which inserts the table with the Picture Content Control) is called to insert a table and a Picture Content Control from an external file; the second Picture Content Control is activated and Photo2 is called into Picture Content Control #2. If there is not a Photo2, then end.
3. Repeat Step 2 for Photo2(+1) until all photos are placed.
If there is a Photo1, and Photo 4, but not a Photo 2 or Photo 3, then same effect as if there was a Photo 1, Photo 2, etc.
I intend for the user to take photos with their camera which defaults to naming the pictures sequentially. They then place their photos into a designated Photo directory. They then create a new word doc file based off of a template. In the template, the User runs a macro which populates the Word doc with structured tables and formatted photos based on the photos they placed into their designated Photo directory. From there, the user is able to complete the remainder of the form (part of the table inserted with the Picture Content Control)
Anyone have any suggestions, code runs, starting points, etc?