boar24 / InsertCrossReferencesComfortably

VBA macro to comfortably insert cross references in MS Word
12 stars 1 forks source link

VBA Doesn't Work Correctly with Custom Caption Labels #9

Closed frijheid closed 1 month ago

frijheid commented 2 months ago

Dear devs, First, I'd like to report you on the groundbreaking updates in the latest VBA release. However, I encountered an issue where VBA fails to function correctly when the caption label is customized by the user, such as changing "Figure" to "Fig." like in the attached figure.

Thank you for your ongoing development efforts. image

boar24 commented 2 months ago

Your screenshot does not show how the figure subtitles have been inserted. In the example document, I could not reproduce the issue. Under the image of Caesar, I changed Figure to Fig.. After updating all the field functions in the document (Ctrl-A, F9), the references in chapter 5 had correctly changed from Figure 1 to Fig. 1.

If you know of a way to reproduce the "We should never get here." error, please let me know how to do it.

frijheid commented 2 months ago

Thanks for the response, here is how the error can be produced. https://github.com/user-attachments/assets/3ef61e31-c8ce-4ce8-a533-6811f1db6997

boar24 commented 2 months ago

Thanks to your most helpful screen recording, I was able to find and fix the bug. The new version is uploaded.

frijheid commented 1 month ago

Thank you very much for the update dev, I just had the opportunity to try it. Code works fine. I really appreciate it.