private void AddTabStops(Word.Selection sel)
        {
            float codeblock_width;
            // in a table tab stops should be placed only where the cell is located horizontally
            if (sel.get_Information(Word.WdInformation.wdWithInTable) == true)
            {
                sel.SelectColumn();
                codeblock_width = wordApp.Selection.Columns[1].Width;   // no too elegant... but there is no better solution in the Word API
            }
            else
            {
                codeblock_width = sel.PageSetup.PageWidth - sel.PageSetup.RightMargin - sel.PageSetup.LeftMargin;
            }

            sel.ParagraphFormat.TabStops.ClearAll();

            for (float j = indentLength; j < codeblock_width; j += indentLength)
            {
                Object alignmentType = Word.WdTabAlignment.wdAlignTabLeft;
                Object tabLeader = Word.WdTabLeader.wdTabLeaderSpaces;
                sel.ParagraphFormat.TabStops.Add(j, ref alignmentType, ref tabLeader);
            }
        }