Copy link to clipboard
Copied
Hi
We have this addin built using the FDK. For some processes we need to check if a document is open before continuing. We found out that sometimes this check positive when the Welcome tab is open even if no other files are.
Is there any way in the FDK to check specifically to check if the Welcome tab is visible, or even better a way to close the Welcome tab via code?
Copy link to clipboard
Copied
This is ExtendScript code, but you can adapt it with FDK syntax. It looks like the Welcome tab is internally represented by a Doc object, but its Label property is an empty string. Try opening a new Portrait document and running the code below. The alert will display twice.
#target framemaker
var doc;
doc = app.FirstOpenDoc;
while (doc.ObjectValid () === 1) {
alert (doc.Label);
doc = doc.NextOpenDocInSession;
}