T
TFTAJLLYMXZP
I'm trying to convert some macro code from our Word 2003 templates to
work with Word 2007, but am confused by the behaviour of the
BuildingBlocks collection. Why is it that I cannot loop through the
collection with a For Each..Next structure? The following fragment
throws error #438 when it reaches the "For Each..." line, stating
"Object doesn't support this property or method."
Sub TestThis
Dim objTemplate As Template
Dim objBB As BuildingBlock
Set objTemplate = ActiveDocument.AttachedTemplate
For Each objBB In objTemplate.BuildingBlockEntries
<do stuff>
Next objBB
Any help will be greatly appreciated,
Alder
work with Word 2007, but am confused by the behaviour of the
BuildingBlocks collection. Why is it that I cannot loop through the
collection with a For Each..Next structure? The following fragment
throws error #438 when it reaches the "For Each..." line, stating
"Object doesn't support this property or method."
Sub TestThis
Dim objTemplate As Template
Dim objBB As BuildingBlock
Set objTemplate = ActiveDocument.AttachedTemplate
For Each objBB In objTemplate.BuildingBlockEntries
<do stuff>
Next objBB
Any help will be greatly appreciated,
Alder