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'hui221
Hier1893
Cette semaine7290
Ce mois26583
Total depuis 200418229123

2
visiteurs actuellement en ligne

19 avril 2024