Hello,
I am using Excel to test a concept of Word Document automation using data within a Worksheet. I am also trying to include a picture and then add a caption to it. I have the Microsoft Word 14.0 Object Library loaded as a reference in VBA.
I can add the image file with no problem however there is an issue with the caption labelling. Below is a extract from my code;
When I run the code - (in the resulting document) - the picture is embedded and the following appears as a caption;
Figure Error! Use the Home tab to apply 0 to the text that you want to appear here.-1 – A Caption
I wish to display a figure reference to the "Heading 3" level and I can correct the error manually in Word with no problem however with a lot of pictures this would be time consuming and so I would like to correct this if possible in my code.
If someone has any experience of this or is otherwise able to help me then I would be grateful.
Thanks
Duncan
Bookmarks