Example #1
0
        /// <summary>
        /// 向指定位置添加空行
        /// </summary>
        /// <param name="mydoc"></param>
        /// <param name="str"></param>
        /// <param name="spacenum"></param>
        public void AddSpaceLine(Spire.Doc.Document mydoc, string str, int spacenum)
        {
            var myts = mydoc.FindAllString(Regex.Replace(str, @"\r\n", ""), false, false);

            for (int spaceindex = 0; spaceindex < spacenum; spaceindex++)
            {
                myts[myts.Length - 1].GetAsOneRange().OwnerParagraph.AppendText("\r\n");
            }
        }