Hi, there
As when you insert a new source for bibliography in "Word", you can not spell check it. Can I insert a new source by VBA?
Thanks
Regards,
Lily
Last edited by SpringLily; 12-23-2011 at 03:57 AM. Reason: Solved
Hi Lily,
You can do this via code like: ActiveDocument.Bibliography.Sources.Add StrXML
See 'Working with Bibliographies' in Word's vba help file. Note that you have to embed the new entry in XML code. The code example for this in the Help file is:
Sub AddBibSource() Dim strXml As String strXml = "<b:Source xmlns:b=""http://schemas.microsoft.com/" & _ "office/word/2004/10/bibliography""><b:Tag>Mor01</b:Tag>" & _ "<b:SourceType>Book</b:SourceType><b:Author><b:Author>" & _ "<b:NameList><b:Person><b:Last>Hezi</b:Last>" & _ "<b:First>Mor</b:First></b:Person></b:NameList></b:Author>" & _ "</b:Author><b:Title>The New Office</b:Title>" & _ "<b:Year>2006</b:Year><b:City>Seattle</b:City>" & _ "<b:Publisher>Adventure Works Press</b:Publisher>" & _ "</b:Source>" Application.Bibliography.Sources.Add strXml End Sub
Cheers,
Paul Edstein
[MS MVP - Word]
Thanks, Paul. This is very helpful. Regards, Lily.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks