Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-11-2016, 04:36 PM
photoval photoval is offline MACRO in infinite loop when it encounters user defined figure label Windows 7 64bit MACRO in infinite loop when it encounters user defined figure label Office 2010 64bit
Novice
MACRO in infinite loop when it encounters user defined figure label
 
Join Date: Jan 2016
Posts: 2
photoval is on a distinguished road
Default MACRO in infinite loop when it encounters user defined figure label


I created a MACRO in VBA that looks for words in all capitals and their definitions if the user defined them and places all these words in a new document. It works for the most part but I now have a problem that if I use a heading style to create a new figure label to allow for chapter numbering in appendices then the macro gets into an infinite loop. It does a good job up to the first figure in the appendix and then decides to start back at the beginning of the document. If I select the Figure label and toggle the field codes, then the macro will work fine.

Attached is my test file. It should have the macro included. It is called "ListAcronyms"

Is there a way to get it to either skip over the specialized field codes or to toggle all the specialized field codes to be displayed at the beginning of the macro and then hide them at the end?

Thanks in Advance.

Notes on special formatting:
Heading 1-6 - typical chapter numbering 1.1.1 ....
Heading 7 - Appendix A, B, ....
Heading 8 A.1, B.1, ......
Caption - Figure label should use Heading 1 as the chapter number so you get Figure 1.1, Figure 2.4, etc. Same for Table label.
I created two new labels: Figure_Apx and Table_Apx that use Heading 7 as the chapter number so I get Figure_Apx A.1, Table_Apx A.4, etc. However I then deleted the "_Apx" and then highlighted the text to create an Autotext entry. That way when I insert AutoText FigureAppendix it will insert Figure A.1 without the extraneous "_Apx" text.

I followed http://www.shaunakelly.com/word/numb...ppendixes.html
when creating these styles.
Attached Files
File Type: docx test.docx (33.8 KB, 10 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
MACRO in infinite loop when it encounters user defined figure label FileSystemObject Compile Error: User-Defined Type Not Defined gsrikanth Excel Programming 2 03-28-2022 06:32 AM
MACRO in infinite loop when it encounters user defined figure label Macro to replace text and track changes based on user-defined rules Thefirstfish` Word VBA 13 01-09-2016 07:14 AM
Outlook 2013 - caught in an infinite loop on startup borderfox Outlook 0 07-26-2015 01:40 PM
MACRO in infinite loop when it encounters user defined figure label User-defined Type not Defined VBA Issue OTPM Project 3 01-02-2014 01:47 PM
'Infinite Loop' error with Infopath 2010 Debbie25 Misc 2 05-18-2011 08:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft