Beispiel #1
0
        //проверка на половину документа
        private static bool AmountOfText()
        {
            var page = 1;
            var line = 0;

            WordApp.Selection.HomeKey(WdUnits.wdStory);
            for (int i = 1; i < WordRange.ComputeStatistics(WdStatistic.wdStatisticLines); i++)
            {
                var count = (int)WordApp.Selection.Range.Information[WdInformation.wdActiveEndPageNumber];
                if (count == page)
                {
                    line++;
                }
                else
                {
                    if (line < 14 && page != 1)
                    {
                        return(true);
                    }
                    page++;
                    line = 0;
                }
                WordApp.Selection.MoveDown(WdUnits.wdLine);
            }
            return(false);
        }