Open all documents in the current source Active doc

Hey all,.

I am writing my first script using ExtendScript. What I would like is for the script open the reference documents for all cards in the current active document.

I think I'm pretty close, but I'm unable to find the right method to call to obtain the path to the current insert. So far, I have:

function main()

{

var doc is app. ActiveDoc;

If (! doc.) ObjectValid())

{

Alert ("no active document in short");

return;

}

medallion of var = doc. FirstTiInDoc;

While (in Medallion. ObjectValid())

{

Open the source document

var Cheminaccesfichiersource = insert. InsetFile;           < <-this does not work

openFile (sourceFilepath);

move to the next box

inset = insert. NextTiInDoc;

}

return ("Script complete");

}

function openFile (filename)

{

var openParams = GetOpenDefaultParams();

var i = GetPropIndex (openParams, Constants.FS_FileIsOldVersion);

.propVal.ival = constant .FV_DoOK openParams [i];

I have = GetPropIndex (openParams, Constants.FS_FontNotFoundInDoc);

openParams [i].propVal.ival = Constants.FV_DoOK;

I have = GetPropIndex (openParams, Constants.FS_FileIsInUse);

openParams [i].propVal.ival = Constants.FV_OpenViewOnly;

I have = GetPropIndex (openParams, Constants.FS_AlertUserAboutFailure);

openParams [i].propVal.ival = Constants.FV_DoCancel;

I have = GetPropIndex (openParams, Constants.FS_LockCantBeReset);

openParams [i].propVal.ival = Constants.FV_DoOK;

var returnParams = new PropVals();

var fileObj = Open (filename, openParams, returnParams);

Return fileObj;

}

I tried inset. InsetFile and inset.filePath, but none work. Can someone tell me the correct syntax? Thank you!

Try TiFile

-Rick

Tags: Adobe FrameMaker

Similar Questions

  • There was an error opening this document. The file is damaged and cannot be repaired.

    Greetings,

    I searched the forums, and this mistake has been examined in the context of how to treat a damaged PDF file.

    My question is a little different. The company that I am working has a tool to create what we call "knowledge base articles", i.e. product XML authoring with us help topics. They used this tool from 2008. Files can be attached to a topic. The XML files and attached PDF files is stored in a SQL database. Using the TOC Panel or the search function, relevant topics are retrieved.

    When there is an attached PDF, users can view the PDF in the browser or download the file and open it locally.

    The knowledge base has been moved from an environment of database SQL 2005 in Windows Server 2003 and IIS 6 for an environment database of SQL 2008 R2 to Windows Server 2008 R2, IIS 7.

    Now that we have the following problem: in some subjects the downloaded PDF can't be opened and one error

    "There is an error opening this document. The file is damaged and cannot be repaired. "is displayed. The curious is that some PDF files published this error, while others open without a problem. Source file all PDF files open without a hitch before they are downloaded.

    Any advice or pointers would be very appreciated.

    TIA, Donna

    Donna,.

    as you have probably read in a lot of discussions on this matter, this error message is usually correct, and the PDF file is damaged. As for how it gets damaged, it's something you need to know by poking around in your system. Here are a few general things that always apply when working with corrupt files:

    The first thing I would do is open such a file corrupted in a text editor such as NotePad to see what it actually contains. Any valid PDF file must begin with '% PDF -' followed by a version number. If you don't see that in the first line, then you are not dealing with a PDF file and you know why you do not get the file saved in your knowledge base.

    If this string is there, then you know that there a PDF file and the issue is somewhere in this file, and is where it gets much more complex. You will need a good understanding of the PDF specification to parse the file to see what is wrong with him.

    If you're lucky, you'll actually have a file of length zero (which means also no PDF header). No valid PDF file cannot be zero bytes long. Your second chance case would you find in fact an HTML error in this file (instead of PDF content), that tells you the reason for the problem (but again, this depends on your system).

  • Windows Media Center opens all documents such as PDFs and printing that I tried to get a software. How can I fix?

    Windows Media Center opens all documents such as PDFs unless you use the open with option.  I just tried to print a page from a software and it goes to the WMC and I can't find the document in the library to open it in pdf or Word format.  What can I do?

    Hello

    You did changes to the computer before the show?

     

    Method 1:

    Important: this section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information on how to to back up and restore the registry, see:

    Back up the registry:

    http://Windows.Microsoft.com/en-my/Windows7/back-up-the-registry

    When you run an .exe on a Windows Vista-based or Windows 7 computer file, the file may start another program:

    http://support.Microsoft.com/kb/950505

    Method 2:  See the following article:

    Change the programs that Windows uses by default:

    http://Windows.Microsoft.com/en-us/Windows7/change-which-programs-Windows-uses-by-default

    Method 3: Restore the computer to a date when it was working fine.

    Reference:

    System Restore: frequently asked questions:

    http://Windows.Microsoft.com/en-us/Windows7/system-restore-frequently-asked-questions

  • How to open a document in the way?

    I'm sorry, I'm a new Member of the INDD sdk, so I no Understand indd SDK struct.

    I have some questions, Please help:

    How to open a document in the way?

    How browes all the objects in the document?

    How to configure a TextFrame character fontname?

    Thank you all.

    1. you can use SDKLayoutHelper::OpenDocument method to open a document.

    2 see SnpInspectLayoutModel for code related to inspect the document.

    for example, ReportDocumentByHierarchy, ReportDocumentByDocumentLayer, etc.

    See SnippetRunner example of plugin in the SDK.

    You will get most of the things here.

  • How to open PDF documents in the same window?

    Prof. Acrobat X / Windows:

    How to manage open PDF documents in the same window?

    When I open more than a single PDF docs and a second, third,... window opens, each document is opened in a separate window.

    In previous versions (Acrobat 8 Prof.), all the documents were opened in the same window.

    This is especially useful, because the windows are not spread over the entire desktop, and with ALT + TAB I can change between the documents, if I don't have that one window.

    Thanks for any help.

    This feature has been removed.

  • How can retrieve us a list of the current source of session and server desktop manager VDI admin console or view?

    Hi all

    How can we extract the list of the current source session and Desktop Manager console or view VDI server. I did it via the administration console VDI himself (just copied VDI console URL and passed to the Excel file), but it poses problem in the conf file and generates the error and change the refresh value o-1 (for this reason our VDI console was not showing the list of users in the means of the pool when we clicked on any pool he went into the suspended state) I fought for this problem since a week and after a lot of research on the VMware site, I found the error and the solution but I solved the problem, but now I again reqiured a list of computers disconnected and connected and ready.

    The thing is that I need to know

    How many users is connected or disconnected?

    How many office are ready assined to a bot user does not use them?

    I have the plan hurt get the list and stops the virtual machines that are in ready state, then it will improve the performance of the VDI cluster.

    Is there any problem so ill stop the virtual machines that are in the ready state.

    Thanks in advance!

    Pradeep K Yadav [email protected] administrator VMware & VDI

    Why do you the work by yourself?

    Use the Provisionigs parameter to stop the unused VMs in order of time / disconnect or logoff.

  • White screen on Windows Vista Start-cannot open all programs, even the Task Manager

    Original title: white screen on startup of Windows Vista

    Hello

    I tried tirelessly fix my Sony Vaio computer that is running Windows Vista. After that I entered my password by logging into my account, the screen charge nothing; It is empty. I'm unable to open all programs, even the Task Manager.

    I AM able to start safe mode. I tried MSCONFIG, removing all the programs of cleaning, power off start up programs, but nothing seems to work. Can anyone help? Thank you.

    Hello

    See if that helps you.

    Do a Safe Mode system restore to before the problem started.

    http://bertk.MVPs.org/html/restoresysv.html

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    If it doesn't, try a startup repair and / or a system restore using a DVD of Vista from Microsoft

    Manufacturers recovery disks normally do not have Service Options; they are normally a relocation to the factory only settings option.

    Here is the guide to repair Options using a Vista DVD from Microsoft.

    If a friend or a work acquantance of yours has one, you can borrow and use it for repairs.

    http://www.bleepingcomputer.com/tutorials/repair-Windows-with-Windows-Startup-Repair/

    Table of contents

    1. Overview of Windows Vista repair options
    2. How to perform an automatic repair of Windows Vista using Startup Repair
    3. Advanced Tools Overview
    4. Conclusion

    If you do not or can not borrow a Microsoft DVD there is a download of a file ISO of Vista Startup Repair available that you can put on a Bootable floppy to make the above startup repair and that the method is recommended by a large number of posters in these Forums.

    Unfortunately, you have to buy it.

    Here is a link to it:

    http://NeoSmart.net/blog/2011/Windows-Recovery-discs-updated-reinstated/

    See you soon.

  • Failed to open all files with the extension .exe in Vista Business SP2. Dialog box appears and asks which program to use. Seems to have lost the info file assoc after virus removal.

    Failed to open all files with the extension .exe in Vista Business SP2.  Dialog box appears and asks which program to use.  Seems to have lost the info file assoc after virus removal.  Any suggestions?

    Hello

    Try the methods provided below and check if the problem persists.

    Method 1:

    Try the fix it or follow the manual for troubleshooting to solve the problem.

    When you run an .exe on a Windows XP, Windows Vista or Windows 7 computer file, the file can start another program

    http://support.Microsoft.com/kb/950505

    Note:

    The link above contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    How to back up and restore the registry in Windows

    http://support.Microsoft.com/kb/322756

    Method 2:

    Download and run Microsoft Safety Scanner and check if the problem is caused by a Virus/Malware.

    Microsoft safety scanner

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

  • I bought the PDF monthly Pack and I can't open my files on my software of the company. I click on a document and a screen comes up asking me to buy something. I already have. Also before you buy the PDF package I got was able to open my documents of the c

    I bought the PDF monthly Pack and I can't open my files on my software of the company. I click on a document and a screen comes up asking me to buy something. I already have. Also before you buy the PDF package, I was able to open my documents of the company. WTF thank you

    Have you by any chance also tried Acrobat Pro, have a trial version for 30 days, and it is now out of print? If so, you must uninstall it.

  • Adobe Acrobat - 'there was an error opening this document. The file is not found.

    Guys,

    I have a virtual layer to Adobe Flash player, with a point of entry to Internet Explorer. Apart from that, we used Thinreg to associate pdf files with a Thinapp copy of the Adobe Acrobat Reader 7 (using the allusers switch). We find that, while trying to open online pdf files, Acrobat Reader load then shows the error "there was an error opening this document. The file is not found. If we save the file and open it works very well.

    I am positive that it is a problem of isolation somewhere in the config layer of Acrobat Reader, but have not been able to track it down. It is probably that the Acorbat layer not looking outside of himself for the temporary internet folder that contains the pdf file that IE has cached?

    Everyone falls on something similar and has a solution?

    Matt

    Try to set the modes of insulation for your temporary folders (%temp%, % internet cache) merged to your package of IE. In addition, in our environment, we put % internet merged cache%/contents.is5. Not sure if it makes a difference.

  • Open all files in the selected folder .indd

    Hi all

    I want to open all files in the selected folder .indd.

    Try the script:

    myFolder var is Folder.selectDialog ("select a folder with the InDesign files");.

    var myFiles = [];

    var myFileList = myFolder.getFiles ();

    for (var i = 0; i < myFileList.length; i ++) {}

    var myFile = myFileList [i];

    myFile.name.match(/\.indd$/)

    myFiles.push (myFile);

    App.Open (myfiles)

    }

    Can someone give a solution to me.

    Thanks in advance

    BEGINNER

    myFolder var is Folder.selectDialog ("select a folder with the InDesign files");.

    If (! MyAccount)

    Exit (0);

    var myFileList = myFolder.getFiles ();

    for (var i = 0; i)< myfilelist.length;="" i++)="">

    var myFile = myFileList [i];

    (Si (myFile instanceof fichier && {myFile.name.match(/\.indd$/i))}

    App.Open (MyFile);

    }

    }

    See you soon,.

    Stephen

  • Player error: there was an error opening this document.  The size of the file exceeds the limit...

    The total error is: there was an error opening this document.  The size of the file exceeds the limit and cannot be saved.

    error.jpg

    I don't think that player had a size limit?  The file is only a few hundred MB.

    Does anyone have an idea what could be causing this error?

    -Richard.

    Is it a document online or local?

    If online, see http://answers.microsoft.com/en-us/windows/forum/windows_xp-hardware/error-0x800700df-the-file-size-exceeds-the-limit/d208bba6-920c-4639-bd45-f345f462934f

  • Save a file opened under PSD in the current folder without prompting?

    I'm trying to find a way to save an open file as a PSD (from JPG) in the current folder without me.  It seems that it should be so simple.  I use CC 2014.  Using the Image Processor would work, but it creates a new PSD file.  (I tried to modify the imageprocessor.jsx to remove the path, but it did not... maybe because I tried to run the jsx to my office instead of the script folder?  I don't have access to modify the original unfortunately.)

    So yes, just trying to make an action that does stuff and then record it without requiring any interaction.   The closest thing I've found is this script that does everything I want EXCEPT the active document remains a jpg instead of becoming the new DSP.  so I end up having to save anyway and the open the PSD again to continue editing.

    Save the copy under PSD

    var doc = app.activeDocument;

    var Path = doc.path;

    var Name = doc.name.replace (/ \.) [ ^\.] +$/, '');

    Var suffix = "-copy";

    var saveFile = file (path + "/" + Name + ".psd");

    SavePSD (saveFile, 8);

    function SavePSD (saveFile) {}

    psdSaveOptions = new PhotoshopSaveOptions();

    psdSaveOptions.embedColorProfile = true;

    psdSaveOptions.alphaChannels = true;

    activeDocument.saveAs (saveFile, psdSaveOptions, true,

    Extension.LOWERCASE);

    }

    Thank you!

    Change

    activeDocument.saveAs (saveFile, psdSaveOptions, true, Extension.LOWERCASE);

    TO

    activeDocument.saveAs (saveFile, psdSaveOptions, false, Extension.LOWERCASE);

  • Cannot cancel all documents in the print queue, which leads to the mistake of the printer

    Original title:

    I LIKE MY PRINTER, BUT LATELY I CAN'T CANCEL DOCUMENTS "ALL". IT WILL CANCEL ALL BUT ONE... SO I can not PRINT ANY FURTHUR because there is a document remaining, sometimes, you make a mistake and that you do not want the document to print, so it will remove all the document with the exception of the first tht has been implemented.

    THE last time that I had to completely remove the printer from the computer, and then reinstall is there anything else I can do.

    Hello

    1. what happens when you print after that you cannot delete the document in the print queue?

    2. do you get an error message? If Yes, what is the exact error message?

    3 did you changes to the computer, before the show?

    4. what version of Windows is installed on the computer?

    Method 1:

    Check out the following link.

    Printer in Windows problems

    http://Windows.Microsoft.com/en-us/Windows/help/printer-problems-in-Windows

    Method 2:

    Clear the print queue and check if you are able to print manually.

    a. click Start, click run. In the Open box, type services.msc and press ENTER.

    b. right-click on the service labeled or and select stop.

    c. then you must go to the following directory: C:\WINDOWS\System32\spool\PRINTERS. Delete all files in this folder. This will clear all print queues.

    d. now go back to the Services console (step a), click or right click and select Start.

    e. try to print now and check.

  • All Documents and the missing photos after a system restore, what happened, and how can I recover my files?

    Hello
    All of my documents and photos are missing after a system restore. Here's the story. A virus called "Windows Recovery" popped up earlier and I did a system restore to get rid of him. To restart the computer, all my files and photos were missing. I used the system restore in the past in similar situations and have never had any problems. I opened MS Office, and I found some documents in the recent documents list. They open up fine and I saved them, but is only some of the documents. I can find the files in my documents when I do a search on them, but they are empty, when I open them. I also find some pictures and documents when I do a search for them by name, but I remember only a few file names, so I can't retrieve many files this way.

    Can someone help me out here? Thank you

    Hello

    read the information at the bottom of the below link about what makes this malware hide your data files and the cure for it regarding

    Read article 17

    http://www.bleepingcomputer.com/virus-removal/remove-Windows-Recovery

    also follow the correct for that malware removal steps, just to be safe, let's

Maybe you are looking for

  • a separate album multi disc set

    I can't for the life of me, see why a created disc multi disc shows separately for the album. This is the Portrait of Dan Fogelberg, 4 CD set. I did read the information and changed the orinal separated from 4 albums at all with the same name. Delete

  • I want to put my satellite to the State of origin - how?

    Please help I can't find any cd or dvd but to remove all the junk out of my laptop.How can I do? is the operating system on a separate part of the hard drive? I just want the laptop as if I just pulled it from the box. Thanks in advance for any assis

  • Small spot of Champagne seems fallen in the vents of the notebook

    Literally small spot of Champagne won in Mac Pro next to bed here in the hotel. Not sure whether in mode 'sleep' or off but have left open in big bag with big bag of rice for more than 30 hours. Should I put it next to the hot radiator? Does not than

  • Qosmio F50: HDD recovery entry missing - how to get to factory settings

    I got the BSoD problem with driver nVidia 9700 m GTS and will not let me complete installation of recovery. I installed Win Vista from a DVD of Windows recovery in order to have a clean with the standard to avoid more VGA driver installation of accid

  • Satellite L30-SL33: unknown device after the device external USB connection

    Dear all, I bought a Satellite L30-PS33 with Vista, but due to driver with my existing peripheral equipment problems, I decide to switch from Vista to XP.I have an internal problem with usb HUB, even if the installation is OK with design windows XP d