mabentwickeltsich / MendeleyMacros

New functionalities for Mendeley's plugin: hyperlinks for citations pointing to bibliography, hyperlinks for URLs in bibliography, and fix to maintain Microsoft Word style of bibliography.
41 stars 25 forks source link

Lots of references & other issues #6

Closed Azaxa242 closed 5 years ago

Azaxa242 commented 5 years ago

Hi there,

First off, great macro idea!

Few issues though.

1) I have 200+ references and when I execute the code it says "Orphan citation entry found: [###] Remove it from document!". I think this is due to the line "Name:="SignetBibliographie" & Format(CStr(intRefereceNumber), "00#"), " whereby it only accepts one digit references.

image

2) When executing the code for one digit references the original reference [1] turns into [SignetBibliographie_0011] where bold is the new hyperlink and non-bold is the original text that hasn't been deleted.

image

Any assistance on this would be great and would complete the macro for me!

Thanks, Steven

mabentwickeltsich commented 5 years ago

Dear Steven,

I introduced the orphan citation check when I found that one particular citation was not being linked in a document of another user. The number of citations and references should not be a problem; also my document has more than 200 of them and around 300 pages of length.

According to the information you provided, it seems that citation [67] is the problem. I do not think it has to do with the number of digits, as you suggested; otherwise the error would appear much earlier. I suggest you to check that the citation was inserted by the Mendeley plugin (not directly by Microsoft Word) and that it has a corresponding reference in the bibliography (also inserted by the Mendeley plugin).

In addition, would it be possible for you to send me one document that produces the error? It may be easier to perform tests here and find what the problem is. Finally, are you using the latest commit?

Kind regards Luis

Azaxa242 commented 5 years ago

Hi Luis,

I have the Aug 2017 commit.

This doesn't just happen for [67] but for all references above [10].

Do you have an email I can send this to?

Thanks, Steven

mabentwickeltsich commented 5 years ago

Dear Steven,

then I really need to have a look at the document you are using. My emial address is: jose-luis.gonzalez-garcia -at- gwdg.de

Kind regards Luis

Azaxa242 commented 5 years ago

Hi Luis,

I have sent the document.

Please contact me either on here or via email when you can.

Thanks, Steven

Azaxa242 commented 5 years ago

If this occurs use the following code. If this changes the format of other things like picture format and justification then simply go into Word -> File -> Info -> Compatibility Mode (at the top) -> Convert. Code courtesy of Luis:

  1. Sub GAUG_createHyperlinksForCitationsIEEE() Set the flag to True and comment the part with the style:
        blnFound = True
'        blnFound = False
'        With documentSection.Range.Find
'            .Style = "Titre de dernière section"
'            .Execute
'            blnFound = .Found
'        End With
  1. Sub GAUG_createHyperlinksForCitationsAPA() Set the flag to True and comment the part with the style:
        blnFound = True
'        blnFound = False
'        With documentSection.Range.Find
'            .Style = "Titre de dernière section"
'            .Execute
'            blnFound = .Found
'        End With
  1. Sub GAUG_removeHyperlinksForCitations(Optional ByVal strTypeOfExecution As String = "RemoveHyperlinks") Same here, set the flag and comment the code:
        blnFound = True
'        blnFound = False
'        With documentSection.Range.Find
'            .Style = "Titre de dernière section"
'            .Execute
'            blnFound = .Found
'        End With
mabentwickeltsich commented 5 years ago

Dear Steven,

that is what I did to run the macros with your document (as stated in Extending/modifying the code) because you do not have the style "Titre de dernière section" and your bibliography is not in a section with the title using that style.

I did not have any problem at all; the macros run smoothly with your document.

Regards Luis

mabentwickeltsich commented 5 years ago

Closing the issue as the new code DOES NOT require any modification in order to be used.