Stepping Through Multiple Open Documents
I'm trying to step through multiple open documents and do something in each. Have had no luck searching the forum for an answer...probably something discusssed and forgotten years ago. The procedure I'm using works when the "do something" is:
tbl = doc.FirstTblInDoc;
foundText = tbl.MakeTblSelection (Constants.FF_SELECT_WHOLE_TABLE, 0, 0, 0);
However, when I try to do something else, like change font color of first paragraph of each document, it just keeps doing it to the first document. I'm guessing it has something to do with making each document the focus, but I've had no luck figuring out how to do that. Here's my code...
doc = app.FirstOpenDoc;
Alert ("Testing script to step through documents.");
while (doc.ObjectValid()) {
//Do something in the open document
doc = doc.NextOpenDocInSession;
}
