+ Reply to Thread
Results 1 to 1 of 1

Using Excel VBa to Insert a Picture and add Caption to Word Document (Office2010)

  1. #1
    Registered User
    Join Date
    07-31-2015
    Location
    Dorset, England
    MS-Off Ver
    2010
    Posts
    1

    Question Using Excel VBa to Insert a Picture and add Caption to Word Document (Office2010)

    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;

    Please Login or Register  to view this content.
    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
    Last edited by DAB257; 08-03-2015 at 06:09 AM. Reason: Code Tabs Added

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Insert picture next to text in Word 2013 document
    By metsmaniac in forum Word Formatting & General
    Replies: 4
    Last Post: 07-11-2014, 03:09 PM
  2. Macro to insert 2 graphs from seperate excel tabs into a single word document
    By rpt21 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2010, 04:59 PM
  3. Insert Excel 2002 Spreadsheet in Word Document
    By scotfitz in forum Excel General
    Replies: 1
    Last Post: 08-13-2009, 01:43 PM
  4. [SOLVED] Insert Excel hyperlink to word document
    By BHalberstater in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-26-2006, 04:00 AM
  5. [SOLVED] Want to insert Excel sheet in Word document - comes out too big.
    By Chicago in forum Excel General
    Replies: 4
    Last Post: 03-30-2006, 06:55 PM
  6. [SOLVED] Can I insert a word document into a new excel file ?
    By Robyn78 in forum Excel General
    Replies: 2
    Last Post: 08-02-2005, 04:05 PM
  7. [SOLVED] Is there a way to insert a word document into a single excel cell
    By Marty in Austin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2005, 09:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1