Quantcast
Channel: BibWord : Microsoft Word Citation and Bibliography styles
Viewing all articles
Browse latest Browse all 637

New Post: FW: Can a macro operate within individual fields of a Reference?

$
0
0
According to the documentation of the Word Object Model it is not possible to set fields of sources. However when I experimented with it back in 2007 when the feature was first introduced, I noticed that you could change properties of a source as long as the properties were originally defined. You could use this 'bug' to your advantage to remove the comments with a macro like this:
Sub Test()
    Dim s As Source
    
    For Each s In ActiveDocument.Bibliography.Sources
        If InStr(s.XML, "<b:Comments>") > 0 Then
            s.Field("Comments") = ""
        End If
    Next
End Sub

Viewing all articles
Browse latest Browse all 637

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>