GM,
I was trying to access the Paragraph Catalog and delete all the paragraphs styles, so that could import my own styles. I got an error message saying that it could not access the Paragraph Catalog.
I then tried to troubleshoot. Is it able to open the document? Yes. But the reply is that the document is still loading and because of that unable to access Paragraph Catalog.
I think the scripts and question is too big to be answered here.
May I ask if there is there a good resource that you like to learn about ExtendScript for Framemaker?
Thank you,
Vicki
I am sorry for the delay in responding. Here is code that deletes all Paragraph Formats from the active document.
main ();
function main () {
var doc;
// Test for an open, active document.
doc = app.ActiveDoc;
if (doc.ObjectValid () === 1) {
processDoc (doc);
}
}
function processDoc (doc) {
var pgfFmt, nextFmt;
// Delete all paragraph formats in the document.
pgfFmt = doc.FirstPgfFmtInDoc;
while (pgfFmt.ObjectValid () === 1) {
nextFmt = pgfFmt.NextPgfFmtInDoc;
pgfFmt.Delete ();
pgfFmt = nextFmt;
}
}