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'hui1832
Hier1747
Cette semaine7008
Ce mois26301
Total depuis 200418228841

6
visiteurs actuellement en ligne

18 avril 2024