Why would this result in an infinite loop? I thought that wehn it got to the last Pgf object it should become invalid and stop.
var doc = app.ActiveDoc;
var pgf = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;
while ( pgf.ObjectValid() ) {
Console('Hello');
}
pgf = pgf.NextPgfInFlow;
Thanks,
Mark