SimpleOpen() can be called interactively or without user interaction. This distinction makes a difference if you are dealing with files that have issues.
If you are calling SimpleOpen() interactively, the user decides what to do when there are missing fonts, locked files, or other problematic situations.
If you call SimpleOpen() without user interaction FrameMaker defaults to very conservative behavior.
I created a simple a test to demonstrate this behavior. I cobbled together a set of files, each with a distinct issue, and put those files into a FrameMaker book. Each of my four files has one of the following issues:
doc = SimpleOpen(compName, false);
If you are calling SimpleOpen() interactively, the user decides what to do when there are missing fonts, locked files, or other problematic situations.
If you call SimpleOpen() without user interaction FrameMaker defaults to very conservative behavior.
I created a simple a test to demonstrate this behavior. I cobbled together a set of files, each with a distinct issue, and put those files into a FrameMaker book. Each of my four files has one of the following issues:
- It is locked.
- It contains missing graphics.
- It uses unavailable fonts.
- It is in an older FrameMaker version.
doc = SimpleOpen(compName, false);
I tried to use this to open a document, but it seems to always return an invalid object. I did this:
ReplyDeletevar FactsFile =File("C:\\table.fm");
var doc = SimpleOpen (FactsFile,false) ;
But if I check the "doc" to see if its valid, it is not.
if (doc.ObjectValid()) {
$.writeln("doc invalid");
}
Any idea as to what I am doing wrong. I also tried SimpleOpen with true an selected the doc and it still says its invalid.
Thanks
The first thing to check is whether you file opens from the UI without any dialog box coming up. If there are font issues, missing graphics or the like. SimpleOpen() won't open it. Also, check FA_errno. That should tell you why it did not open.
Delete