ich hab da ein Makro ausgegraben, daß mir ein wenig die Struktur eines Worddokumentes analysiert:
Code:
Sub Makro2()
'
' Dokument Inhalt
'
'
With ActiveDocument
MsgBox ("im Dokument enthaltene Shapes:" + Str(.Shapes.Count))
For a = 1 To .Shapes.Count
MsgBox (a + .Shapes(a).Name)
Next
MsgBox ("im Dokument enthaltene InlineShapes:" + Str(.InlineShapes.Count))
MsgBox ("im Dokument enthaltene Sections:" + Str(.Sections.Count))
For a = 1 To .Sections.Count
MsgBox ("Anzahl Header" + Str(.Sections(a).Headers.Count) + " in Section" + Str(a) + Chr(13) + Chr(10) + _
"Anzahl Footer" + Str(.Sections(a).Footers.Count) + " in Section" + Str(a))
For b = 1 To .Sections(a).Headers.Count
MsgBox ("Header " + Str(b) + " Anzahl Shapes " + Str(.Sections(a).Headers(b).Shapes.Count))
Next
Next
MsgBox ("im Dokument enthaltene bookmarks: " + Str(.Bookmarks.Count))
For a = 1 To .Bookmarks.Count
MsgBox (Str(a) + "Bookmark Name:" + .Bookmarks(a).Name + Chr(13) + Chr(10) + _
"Bookmark Länge:" + Str(.Bookmarks(a).Range.StoryLength))
Next
' MsgBox ("im Dokument enthaltene FooterHeader:" + Str(.Shapes.Count))
End With 'ActiveDocument
End Sub
vielleicht hilft Dir das weiter
Gruß
K-H
da stimmt was nicht mit den codeTags??
Pardon, da war noch eine Macke drin.
Sub Makro2()
'
' Dokument Inhalt
'
'
With ActiveDocument
MsgBox ("im Dokument enthaltene Shapes:" + Str(.Shapes.Count))
For a = 1 To .Shapes.Count
MsgBox (Str(a) + .Shapes(a).Name)
Next
MsgBox ("im Dokument enthaltene InlineShapes:" + Str(.InlineShapes.Count))
MsgBox ("im Dokument enthaltene Sections:" + Str(.Sections.Count))
For a = 1 To .Sections.Count
MsgBox ("Anzahl Header" + Str(.Sections(a).Headers.Count) + " in Section" + Str(a) + Chr(13) + Chr(10) + _
"Anzahl Footer" + Str(.Sections(a).Footers.Count) + " in Section" + Str(a))
For b = 1 To .Sections(a).Headers.Count
MsgBox ("Header " + Str(b) + " Anzahl Shapes " + Str(.Sections(a).Headers(b).Shapes.Count))
Next
Next
MsgBox ("im Dokument enthaltene bookmarks: " + Str(.Bookmarks.Count))
For a = 1 To .Bookmarks.Count
MsgBox (Str(a) + "Bookmark Name:" + .Bookmarks(a).Name + Chr(13) + Chr(10) + _
"Bookmark Länge:" + Str(.Bookmarks(a).Range.StoryLength))
Next
' MsgBox ("im Dokument enthaltene FooterHeader:" + Str(.Shapes.Count))
End With 'ActiveDocument
End Sub