I wanted to count all the shapes in certain word document using word macros using this code
Set objWord = GetObject(, "Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Open("D:\Test.docx")
Set var1 = objWord.ActiveDocument
Set var2 = var1.Shapes
Set var3 = var2.Count
but I get this error when executing the script
"at line 7 - Error: Object required: var2.Count"
What is wrong with this ?