Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Tith Tith is offline
external usenet poster
 
Posts: 5
Default Macro to count inline images

I have to format about 10000 word docs that are generated from another source
for a test report. I have built a a macro to do the formating for me but I
would rather make it more automated. I have two differnt reports, the only
difference between them is the number of inline objects.

1. How do I count the number of inline objects?
2. How do I automate word to run the module on a directory (including
sub-directories)
3. How to Save-as in order to maintain the originals?

Thank you!
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Macro to count inline images

Hi Tith,

For a given document, you can use a macro like:
Sub InlineShapeCount()
Dim i As Integer, oRng As Range
With ActiveDocument
For Each oRng In .StoryRanges
i = i + oRng.InlineShapes.Count
Next
End With
MsgBox "This document has " & i & " Inline Shapes."
End Sub

--
Cheers
macropod
[Microsoft MVP - Word]


"Tith" wrote in message ...
I have to format about 10000 word docs that are generated from another source
for a test report. I have built a a macro to do the formating for me but I
would rather make it more automated. I have two differnt reports, the only
difference between them is the number of inline objects.

1. How do I count the number of inline objects?
2. How do I automate word to run the module on a directory (including
sub-directories)
3. How to Save-as in order to maintain the originals?

Thank you!

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Macro to count inline images


Hi Tith,

For a given document, you can use a macro like:
Sub InlineShapeCount()
Dim i As Integer, oRng As Range
With ActiveDocument
For Each oRng In .StoryRanges
i = i + oRng.InlineShapes.Count
Next
End With
MsgBox "This document has " & i & " Inline Shapes."
End Sub

--
Cheers
macropod
[Microsoft MVP - Word]


"Tith" wrote in message ...
I have to format about 10000 word docs that are generated from another source
for a test report. I have built a a macro to do the formating for me but I
would rather make it more automated. I have two differnt reports, the only
difference between them is the number of inline objects.

1. How do I count the number of inline objects?
2. How do I automate word to run the module on a directory (including
sub-directories)
3. How to Save-as in order to maintain the originals?

Thank you!

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inline Images Floating BEHIND Text Pennimus Page Layout 2 February 22nd 10 09:43 PM
Macro to count tracked insertions phosphaenus Microsoft Word Help 3 February 2nd 07 08:30 AM
Macro gives wrong table count? Ed Tables 7 August 2nd 05 10:39 PM
Recording a Macro in a table to count the sum Srinivas MV Tables 1 July 2nd 05 09:12 AM
Ideas for macro to add row for count and percentage Bradley C. Hammerstrom Tables 8 January 6th 05 10:38 AM


All times are GMT +1. The time now is 09:16 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"