To create a document, you only have to open it:
ADOBE FRAMEMAKER SCRIPTING GUIDE says:
Open
Description
Opens a document or book. It can also create a new document.
Open() allows you to specify a property list telling FrameMaker how to open or create the file and how to deal with error and warning conditions.
For example, you can specify whether to abort or to continue opening a document if it contains fonts that are not available. If the file is already open and invisible, it will make the file visible.
Hope that helps
cu
Klaus
EDIT:
Here's an example:
|
var openParams, openReturnParams; |
|
openParams = GetOpenDefaultParams(); |
|
openReturnParams new PropVals(); |
|
var MyFile = "C:\\MyPath\\MyFile.fm"; |
|
oFile = Open(MyFile,openParams, openReturnParams); |
|
|
And if you want to change the parameters:
| var openParams, openReturnParams; |
| openParams = getYourParams (); |
| openReturnParams = new PropVals(); |
| var MyFile = "C:\\MyPath\\MyFile.fm"; |
| oFile = Open(MyFile,openParams, openReturnParams); |
function getYourParams() {
| /* |
| Change the params |
| */ |
| i = GetPropIndex(params, Constants.FS_RefFileNotFound); |
| params.propVal.ival = Constants.FV_AllowAllRefFilesUnFindable; |
|
| i = GetPropIndex(params, Constants.FS_FileIsOldVersion); |
| params.propVal.ival = Constants.FV_DoOK; |
| i = GetPropIndex(params, Constants.FS_FontNotFoundInDoc); |
| params.propVal.ival = Constants.FV_DoOK; |
| i = GetPropIndex(params, Constants.FS_LockCantBeReset); |
| params.propVal.ival = Constants.FV_DoOK; |
|
|
i = GetPropIndex(params, Constants.FS_FileIsInUse); |
| params.propVal.ival = Constants.FV_OpenViewOnly; |
|
| i=GetPropIndex(params,Constants.FS_AlertUserAboutFailure); |
params.propVal.ival=Constants.FV_DoCancel;
| i=GetPropIndex(params,Constants.FS_MakeVisible ); |
| params.propVal.ival=false; |
}