topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday March 19, 2024, 5:09 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: automatically number images in word  (Read 7863 times)

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,820
    • View Profile
    • Donate to Member
automatically number images in word
« on: June 15, 2015, 03:31 AM »
hello

I have a word text document and have inserted various images in it

now I would like to add a caption to each image like Figure 1, 2, 3, etc

is it possible to do it automatically?

thanks!

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: automatically number images in word
« Reply #1 on: June 15, 2015, 05:50 PM »
your best bet with all these automation requests in office is to spend a little bit of time learning VBA.

It really isn't that hard and MS include a handy macro recorder to get you started

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,820
    • View Profile
    • Donate to Member
Re: automatically number images in word
« Reply #2 on: June 16, 2015, 05:06 AM »
VBA might be able to do that, but it won't be easy

first, it needs to go through all the document and scan for images (I need to know the command to identify images and go to through the whole document)
then I need it to insert after every image an incremental text (like Figure 1,2,3,etc) which is not easy too

I am not saying it's difficult, but for someone who doesn't know it's not straightforward

Attronarch

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 147
    • View Profile
    • Donate to Member
Re: automatically number images in word
« Reply #3 on: June 16, 2015, 06:55 AM »
In Word 2010 you can find that option under "References" - "Insert caption".

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,820
    • View Profile
    • Donate to Member
Re: automatically number images in word
« Reply #4 on: June 16, 2015, 07:11 AM »
In Word 2010 you can find that option under "References" - "Insert caption".

I played alot with that, but couldn't figure out how to do it
please note I want to number the images of a document AFTER I have inserted them all

Attronarch

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 147
    • View Profile
    • Donate to Member
Re: automatically number images in word
« Reply #5 on: June 16, 2015, 08:38 AM »
Don't know what confuses you, since it is quite straightforward. Take a look at following instructions: http://guides.lib.um...283073&p=1888263

For insertion of captions it doesn't matter if you've already inserted the images.

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,820
    • View Profile
    • Donate to Member
Re: automatically number images in word
« Reply #6 on: June 16, 2015, 08:41 AM »
Attronarch I think you haven't understood what I am asking

The instructions you posted say "Right-click the object you wish to caption and..."

I don't want to do that for every of the 50 images that exist in the document

I want to automatically (with one click) scan the whole document, find the images and add a caption with an incremental number

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,958
    • View Profile
    • Donate to Member
Tom

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,958
    • View Profile
    • Donate to Member
Re: automatically number images in word
« Reply #8 on: June 16, 2015, 10:05 AM »
^ Presuming that works for you:
it was the second site I checked after searching for label images automatically in Word on startpage.com

i.e. it took less than a minute to find :P
Tom

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,820
    • View Profile
    • Donate to Member
Re: automatically number images in word
« Reply #9 on: June 16, 2015, 12:26 PM »
^ Presuming that works for you:
it was the second site I checked after searching for label images automatically in Word on startpage.com

i.e. it took less than a minute to find :P

man, I know that already
and couldn't find any autocaption type for images
but in a screenshot in google I noticed that it says "Microsoft Word Image" type, so this may be the correct one!
but who could know this????

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,820
    • View Profile
    • Donate to Member
Re: automatically number images in word
« Reply #10 on: June 23, 2015, 03:15 AM »
damn, there is no "Microsoft Word Image" in my Word!
what can I do?
nothing seems relevant to click in AutoCaption settings to autocaption images!

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: automatically number images in word
« Reply #11 on: June 23, 2015, 06:33 PM »
here's a word vba macro that will number the images for you

Sub captions()
Dim i As Integer

For i = 1 To ActiveDocument.InlineShapes.Count
    If ActiveDocument.InlineShapes.Item(i).Type = wdInlineShapePicture Then
        ActiveDocument.InlineShapes(i).Select
        Selection.InsertCaption Label:="Figure", Title:=" - This is image #" & i, Position:=wdCaptionPositionBelow
    End If
Next i
End Sub

google is your friend...

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,820
    • View Profile
    • Donate to Member
Re: automatically number images in word
« Reply #12 on: June 24, 2015, 11:14 AM »
excellent find, or did you write it yourself?

the problem is that it doesn't reupdate the counting/captioning if you have run it in the past and add new images
it creates double captions instead

maybe someone can find that?