/// <summary> /// Gets the infos about the amount of pages and the current page number of a window. /// </summary> /// <param name="win">The DRAW doc window.</param> /// <returns>a String of type ' X/Y', where X is the current page and Y the amount of pages; otherwise the empty string.</returns> private static string getPageNumInfosOfWindow(OoAccessibleDocWnd win) { String result = String.Empty; if (win != null) { int pC = win.GetPageCount(); if (pC > 1) { var aPObs = win.GetActivePage(); if (aPObs != null) { int cP = aPObs.GetPageNum(); if (cP > 0) { result += " " + cP + "/" + pC; } } } } return result; }