Hi,
Is there a forum that has a thread about free source code for a bibliography manager?
I just want to know how did they programmatically Insert a Citation with the corresponding bibliography of the inserted citation in word ,I tried this to make my own but my problem is instead of inserting the corresponding bibliography of the inserted citation my program insert all the bibliography in the document
I'm referring to EndNote,Zotero or something like that software.
I only need there code in inserting a citation
for example in Endnote bibliography manager software when they insert a citation it will insert a citation and the bibliography of the insert citation
example
if they insert a citaiton it will look like this
bla bla bla(Citation1)
(Bibliography1)
and if they insert again a citation so on and so fort
bla bla bla(Citation1)(Citation2)
(Bibliography1)
(Bibliography2)
I hope someone can give me a link or some source code to achieve it
I just really need it
I have code here in Inserting Citation and Bibliography but what happen in this code is it insert all of the bibliography and what I want is only the bibliography that correspond to the inserted citation will be inserted in the document like the example above.
by the way here's my code
private void InsertCitation_Click(object sender, RibbonControlEventArgs e)
{
Application wordApplication = Globals.ThisAddIn.Application;
wordApplication.Selection.Fields.Add(wordApplication.Selection.Range,
ref paramWdFieldTypeCitation, dropDown1.SelectedItem.Label,
ref paramMissing);
Word.Document doc = Globals.ThisAddIn.Application.ActiveDocument;
Word.Range rng = doc.Content;
object oCollapseEnd = Word.WdCollapseDirection.wdCollapseEnd;
rng.Collapse(ref oCollapseEnd);
wordApplication.Selection.EndKey(ref paramWdUnits, ref paramWdMovementType);
wordApplication.Selection.InsertBreak(WdBreakType.wdLineBreak);
bool isFoundFieldBibliography = false;
foreach (Field field in wordApplication.ActiveDocument.Range().Fields)
{
if (field.Type == WdFieldType.wdFieldBibliography)
{
isFoundFieldBibliography = true;
field.Update();
}
}
if (!isFoundFieldBibliography)
{
wordApplication.Selection.Fields.Add(wordApplication.Selection.Range,
ref paramWdFieldTypeBiblio, ref paramMissing, ref paramMissing);
}
}private void RefreshBibliography_Click(object sender, RibbonControlEventArgs e)
{
Refresh_Bibliography();
}
private void Refresh_Bibliography()
{
this.dropDown1.Items.Clear();
foreach (Source source in Globals.ThisAddIn.Application.ActiveDocument.Bibliography.Sources)
{
RibbonDropDownItem item = Globals.Factory.GetRibbonFactory().CreateRibbonDropDownItem();
item.Label = source.Tag;
this.dropDown1.Items.Add(item);
}
}
Thank you in advance to someone who can help me about my problem