InDesign crashes during the creation of tags

Hello!

I am trying to find a way to take all styles in a document, turn them into labels and all styles of map to their corresponding tags automatically. This script works, but to halfway through, it freezes and Indesign crashes without warning. This happens in mac and windows, cs 5.5 and 6.

The script is:

var myDoc = app.activeDocument;
var myPStyle = myDoc.allParagraphStyles;
for (i=2; i<myPStyle.length; i++){
     var myPStyleName = myPStyle[i];
     try{
          var myXml = myDoc.xmlTags.add(String(myPStyle[i].name.replace(" ","-").split("/")[0].split(".")[0]));
          }catch(e){}
     app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing; 
     app.findTextPreferences.appliedParagraphStyle = myPStyleName;
     app.changeTextPreferences.markupTag=myPStyle[i].name.replace(" ","-").split("/")[0].split(".")[0];
     app.activeDocument.changeText(); 
     app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing; 
     }

Any advice, or another way to fix this would be very welcome!

Best,

Nate

Hey Nate,

I have mofied your JS code above, please try this JS code.

var myDoc = app.activeDocument;
var myPStyle = myDoc.allParagraphStyles;
for (i=2; i

THX

csm_phil

Tags: InDesign

Similar Questions

  • My DVD burner has crashed during the creation of media recovery disks.

    HP Pavilion p7 - 1269c using Windows 7 Home premium desktop PC. How to reset the creation process so the Recovery Manager will allow me to start over again?

    As far as I know, you don't reset the creative process. If the HP Recovery Manager thinks that he has created a set of discs, it's done. Please contact HP and ask for a free set of disks. Explain your situation to them.

  • PSE11: Crash during the creation of a montage

    Hello

    I tried to create a collage of 3 images. I choose this three images and select the format. After that, I click on Ok, then PSE will crash.

    I repeat this several times using other formats, but again, it won't work.

    I use Microsoft Windows 8 and 11 Photoshop elements.

    What can I do to fix this?

    Kind regards

    Mark

    Well, really the easiest thing is to simply not use the collage. In some versions of PSE it features are available only in creating it is so logical to do there, but PES 11 there is not one thing you cannot do more easily in the editor, even if the collage works perfectly, and there are some big restrictions on what you can do.

    I would just create a new empty file in the editor of the size and orientation you want, get out the Panel from scratch and graphic. It is at least as easy as harass with the collage to do the same thing.

  • Cannot complete installation of Firefox 34.0.5. The installer of Mozilla Firefox crashes at the creation of shortcut (.lnk Mozilla Firefox) (see downloaded the image)

    Cannot complete installation of Firefox 34.0.5. The installer of Mozilla Firefox crashes at the creation of shortcut (.lnk Mozilla Firefox) on the status bar of the installation window. OS: Windows 8.1 system had old version of Firefox, but is no longer in the list programs. There is no file helper.exe manually uninstall any previous version or remnant of an older version, but I don't have folder C:\Program Files (x 86) \Mozilla Firefox to. Thank you.

    Try this:

  • Satellite Pro A110 crashes during the transfer of the large data in LAN

    Hello

    My Satellite Pro A110 crashes during the transfer of the large data in LAN. The network driver is a Realtek RTL8139/810 x Family Fast Ethernet NIC I've been looking through this forum and found some wire whit exactly the same problem, saying that the solution is to update Realtek lan set up in BIOS, not the computer BIOS, but I can't find any link to download the necessary upgrade file. Can anyone tell me please where to find this upgrade file or send it to me directly?

    Thanks in advance

    Is - this transfer of data in the company where you work? Do you want to download data from the server, or how to understand this? How to understand what you mean under big data?

    Have you tried downloading data on the Internet? For example, if you try to download some trailer HD (more than 200 MB)?

  • Equium A60 crashed during the update of the Bios

    Hello, can someone tell me if this can be repaired. IHAVE an A60 Equium that crashed during the update of the BIOS, now he died nothing lights up.
    Thanks in advance

    I presume that the BIOS chip is damaged. In this case, you can do anything to make it work again. Just approved can help.

    The problem is that the repair can be quite expensive. Check it out. If selling Yes the laptop on eBay and... you know what I mean. :(

  • Full backup impossible. An error occurred during the creation of the backup folder.

    Having had a HARD drive failure and have replaced I have now bought a WD 3 to WD My Book for Mac. Plug and put in place to save. However will not achieve, and gives this error message

    Full backup impossible. An error occurred during the creation of the backup folder.

    Does anyone else have this problem?

    Paul

    How the drive is formatted?

  • I don't like to upgrade Windows XP to Windows 7, because I'm blue screen/crash during the upgrade but the upgrade Windows XP to Windows Vista does not crash during the upgrade!

    I have my computer to another, here my specs:

    Intel Core 2 Duo
    Hard drive 500 GB
    2 GB OF RAM
    DVD player
    Floppy Disk
    The operating system that is running Genuine Windows XP Professional Service Pack 3 and just upgraded Windows 7 (but I know before upgrading Windows 7) and keep the blue screen / Crash when upgrading to Windows 7. but the upgrade Windows XP to Windows Vista is not blue screen/crash during the upgrade.
    Is anyone to upgrade from earlier version of Windows to Windows 7 without crashing and spending fortune?

    Hello

    1 did you change on your computer before this problem?

    2. What is the blue stop screen error message?

    3. When you receive a blue screen during the upgrade?

    You can follow the suggestions and then check.

    Method 1

    Disconnect external devices connected to the computer?

    Method 2

    You can read the article and then check.

    Upgrade Windows XP to Windows 7

    http://Windows.Microsoft.com/en-us/Windows7/help/upgrading-from-Windows-XP-to-Windows-7

    See also:

    Windows 7 Upgrade and Migration Guide

    http://TechNet.Microsoft.com/en-us/library/dd446674 (v = ws.10) .aspx

  • When you save the playlist, error - "Windows Media Player has encountered a problem during the creation or recording of the reading list.".

    When I try to save a playlist, I get an error message "Windows Media Player has encountered a problem during the creation or recording of the reading list.".

    Hello

    • Will there be any changes made prior to this issue?
    • What version of Windows are you using?

    Step 1: I recommend to run the Windows Media Player settings Troubleshooter and check.

    http://Windows.Microsoft.com/en-us/Windows7/open-the-Windows-Media-Player-settings-Troubleshooter

    Step 2: If the problem is to uninstall and reinstall Windows Media Player. Here's how.

    Uninstalling and reinstalling Windows Media Player:

    (A) uninstall Windows Media Player:

    a. go to start and in the search type 'Turn Windows has or not'.

    b. click on "Turn Windows features on or off".

    c. find multimedia and uncheck the brand in the face of Windows Media Player.

    d. restart the computer

    (B) reinstall Windows Media Player:

    a. go to start and in the search type 'Turn Windows has or not'.

    b. click on "Turn Windows features on or off".

    c. find the multimedia functions and place a check mark in front of the Windows Media Player.

    d. restart the computer.

    For more information, see the article below:

    http://Windows.Microsoft.com/en-us/Windows7/turn-Windows-features-on-or-off

  • Reference Dell backup and restore - "an error occurred during the creation of the backup of the system"

    I have a Dell XPS-8700 running Windows 7.  I bought the Dell Backup and Recovery Premium Edition.

    I was able to create a backup bootable (hot spare), and I can create a backup of data on my external hard drive.  However, whenever I try to create a backup on my external hard drive system, after about three seconds in the process, he returned: "an error occurred during the creation of the backup of the system.

    How can I create a backup of the system?  Why I get this error?

    Thanks for all the info. My situation sounds very similar to yours.

    I removed using Add/REMOVE programs in the control panel DBR and he removed cleanly.

    V1.7.1.2 downloaded and executed new facility.

    When I ran, it was my premium license key so he had yet to register and was not removed by uninstall.

    As before, Rescue Disk ran and installed the new partition (DBR_BOOT) on WD Passport.

    However, backup system immediately stopped with disconnected, missing target location or full. Tried several times...

    In any case, sounds like you have solved your problem, so you like OP should this brand this post/thread as answered. I will continue to post on my other thread.

  • Windows 8 crashed during the last update, now wants to save and may not do.

    Windows 8 crashed during the last update. Stuck at 30% for more than 4 hours before I finally pressed the power button to restart the system. Windows 8 Pro with Media Center now says system build 9200 at the bottom right of the screen.

    Whenever I try to activate Windows 8, it cannot connect. When you use the command prompt Windows + R and slui 3 with my purchased serial number I get Code 0 x 80070424. Description: The specified service does not exist as an installed service.

    Hello

    This error can appear if your firewall settings prevent Windows to complete the online activation process. To resolve this problem, you can activate Windows by phone instead.

    1. Enter in the right edge of the screen and then click on Search.
      (If you use a mouse, point to the upper right of the screen, move the pointer of the mouse down and then click find.)
    2. Type SLUI 04 in the search box, type or click on applicationsand then tap or click SLUI 04.
    3. Follow the instructions on the screen.

    Hope this helps

  • During the creation of domestic demand, we enter the destination location, but when IR is converted to ISO how this system pick up the customer?

    During the creation of domestic demand, we enter the destination location, but when IR is converted to ISO how this system pick up the customer?

    Hello

    The location is added to the customer (internal part).

    Kind regards

    Isabelle Syed

  • My mac crashes during the installation of the cs6. I have to turn off the mac. Now, I can't reinstall or uninstall cs6. He said the Installer failed to initialize.

    My mac crashes during the installation of the cs6. I have to turn off the mac. Now, I can't reinstall or uninstall cs6. He said the Installer failed to initialize.

    If you have not yet installed any Adobe application, try step below and check.

    Step 1

    (1) right-click on the icon in the Finder, then select 'Go - To' folder.
    (2) you will get a text box, type in the following command and then press the 'return '. ( "Don't miss ~ symbol" )

    ~/Library

    It will open the folder of the user's library.

    (3) then navigate to Application Support > Adobe.

    Open the Adobe folder and rename the OOBE, OOBE old and AAMUpdater to old AAMUpdater.

    Step 2

    (1) right-click on the icon in the Finder, then select 'Go - To' folder.
    (2) you will get a text box, type in the following command and then press the 'return '.

    / Library

    It will open the folder System Library.

    (3) then navigate to Application Support > Adobe.

    Open the Adobe folder and rename the folder Caps Caps-old and young OOBE to centenarians, OOBE Adobe Application Manager of Adobe Application Manager.


    Step 3)

    Basket of Adobe Application Manager of Applications > utilities.

    Step 4) [same step again]

    Click on the link below and download Adobe Application Manager and install the same:

    http://download.Adobe.com/pub/Adobe/creativesuite/CC/Mac/ApplicationManager9.0_all.dmg

    Once installation is complete, niche is going disappear, and then open the Application folder and locate the icon to launch Adobe Application manager, double-click it and update.

    Once the update is complete.

    Restart the computer once and try to install CS 6.

  • How can I change the name I entered during the creation of my my name on behalf of our company Adobe ID?

    How can I change the name I entered during the creation of my my name on behalf of our company Adobe ID?

    See: How can I change the name of the account on behalf of our company?

  • Reissue of links a file to an article 'an error occurred during the creation of the article. Missing the capital inflow. »

    Someone had this problem?

    I can't find in any other discussion.

    "An error occurred during the creation of the article. Missing the capital inflow. »

    Sometimes when I create a link to a new file in an article. Folio Builder tries to update the file and he paused by the message.

    It just stays there, and it won't let me cancel the update or do anything else.

    Sound familiar?

    Please, let me know.

    Thank you!

    In most cases, this error message is caused by one or more broken links to the assets of overlays. Select different overlay images in your document and look for a yellow triangle in the overlays Panel.

Maybe you are looking for