T
Tith
I'm in need of a macro to help me format upwards of 10000 word files. I have
the two macros I will need to format each word doc, but I would like to
automate this further by running it on a directory (including
sub-directories). I'm not very familar with VBA so I'm stumbling through it.
these reports will either have 4 or 5 inline images and each will have to be
treated a little dirfferently. I have created the macros for those two
situations.
Sub ChooseMacro()
'
' Macro3 ChooseMacro
' Macro created 3/24/2010 by tith
' Determines which macro to run, Macro1() or Macro2()
'
Dim iShapeCount As Integer
Dim tmpMsg As String
Set ThisDoc = ActiveDocument
iShapeCount = ThisDoc.InlineShapes.Count
If iShapeCount = 4 Then
' How do I call a macro inside a macro?
' Macro1()
tmpMsg = "Run Macro1()"
MsgBox (tmpMsg)
ElseIf iShapeCount = 5 Then
' How do I call a macro inside a macro?
' Macro2()
tmpMsg = "Run Macro2()"
MsgBox (tmpMsg)
Else
' Do nothing
End If
End Sub
the two macros I will need to format each word doc, but I would like to
automate this further by running it on a directory (including
sub-directories). I'm not very familar with VBA so I'm stumbling through it.
these reports will either have 4 or 5 inline images and each will have to be
treated a little dirfferently. I have created the macros for those two
situations.
Sub ChooseMacro()
'
' Macro3 ChooseMacro
' Macro created 3/24/2010 by tith
' Determines which macro to run, Macro1() or Macro2()
'
Dim iShapeCount As Integer
Dim tmpMsg As String
Set ThisDoc = ActiveDocument
iShapeCount = ThisDoc.InlineShapes.Count
If iShapeCount = 4 Then
' How do I call a macro inside a macro?
' Macro1()
tmpMsg = "Run Macro1()"
MsgBox (tmpMsg)
ElseIf iShapeCount = 5 Then
' How do I call a macro inside a macro?
' Macro2()
tmpMsg = "Run Macro2()"
MsgBox (tmpMsg)
Else
' Do nothing
End If
End Sub