17. Januar 2007 17:45
17. Januar 2007 19:25
18. Januar 2007 10:30
Sub countwords()
    Dim i As Integer
    Dim bold_count As Integer
    Dim notbold_count As Integer
    Dim word_count As Integer
    
    bold_count = 0
    notbold_count = 0
        
    ActiveDocument.Select
    
    Set temp = Dialogs(wdDialogToolsWordCount)
    ' Execute the dialog box in order to refresh its data.
    temp.Execute
    word_count = temp.Words
        
    For i = 1 To word_count
        ActiveDocument.Range.Words(i).Select
        'ActiveDocument.Words(i).Select
        If Selection.Font.Bold Then
            bold_count = bold_count + 1
        Else
            notbold_count = notbold_count + 1
        End If
    Next i
                
End Sub18. Januar 2007 11:15
18. Januar 2007 15:45
18. Januar 2007 16:07
18. Januar 2007 18:27
19. Januar 2007 12:44
FOR i := 1 TO wordWords.Count DO BEGIN 
  wordRange := wordWords.Item(i);
  IF (wordRange.Bold = -1) THEN BEGIN
    IF (STRLEN(wordRange.Text) > 1) THEN
      bold_count += 1;
  END ELSE BEGIN
    IF (STRLEN(wordRange.Text) > 1) THEN
      notbold_count += 1;
  END;
END;22. Januar 2007 11:17