Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inline Images Floating BEHIND Text | Page Layout | |||
Macro to count tracked insertions | Microsoft Word Help | |||
Macro gives wrong table count? | Tables | |||
Recording a Macro in a table to count the sum | Tables | |||
Ideas for macro to add row for count and percentage | Tables |