user_mobilelogo

 Voici deux macros qui ajoutent un commentaire avec le nom du signet, pour chaque signet :

 Public Sub AfficheNomSignet()
'Code écrit par Guy Moncomble 2002
Dim varSignet As Bookmark
Application.ScreenUpdating = False
For Each varSignet In ActiveDocument.Bookmarks
ActiveDocument.Comments.Add Range:=varSignet.Range,
Text:=varSignet.Name
Next varSignet
Application.ScreenUpdating = True
End Sub

Public Sub AfficheCodeChamp()
'Code écrit par Guy Moncomble 2002
Dim varSignet As Bookmark, txtCom As String
Application.ScreenUpdating = False
For Each varSignet In ActiveDocument.Bookmarks
If varSignet.Range.Fields.Count > 0 Then
txtCom = varSignet.Name & " : " & varSignet.Range.Fields(1).Code.Text
Else
txtCom = varSignet.Name
End If
ActiveDocument.Comments.Add Range:=varSignet.Range, Text:=txtCom
Next varSignet
Application.ScreenUpdating = True
End Sub

 

 

Statistiques

Aujourd'hui1100
Hier2165
Cette semaine8596
Ce mois38828
Total depuis 200418241368

10
visiteurs actuellement en ligne

26 avril 2024