The easiest way to open a file is with SimpleOpen(). This is the analog to SimpleSave() discussed here.
If you do the open interactively, you do not need to know the file's location. You simply let the user locate the proper file.
The following script passes an empty string for the fileName parameter. FrameMaker assumes the file is the last one opened.
var doc;
doc = SimpleOpen("", true);
To open a file without user interaction, you need to pass it is full pathname and false for the second parameter.
If you do the open interactively, you do not need to know the file's location. You simply let the user locate the proper file.
The following script passes an empty string for the fileName parameter. FrameMaker assumes the file is the last one opened.
var doc;
doc = SimpleOpen("", true);
To open a file without user interaction, you need to pass it is full pathname and false for the second parameter.
Hello
ReplyDeleteFirst of all great work.
Second i need a script that open files from a directory and saves them in an older version.I saw you have a code to save a file in an older version but i need to save in 7 and it doesn't work(works fine in 9,8).
Thanks
Hi,
ReplyDeleteTry saving the file as MIF. You may find you can open it in version 7. Do a manual test before you write any code.
Best of luck.
Debra