WPAT and table cells and paragraphs within table cells

  • Hi Julian, a couple of questions problems and possible bugs relating to above. I am designing a border and fill dialog with as far as possible the functionality provided by Word. I am not far off, but have hit a couple of snags:

    1 There does not appear to be any way of setting the border and fill properties of a textual paragraph within a cell. Presumably, this is not supported. If it is, can you please advise how I do it.

    2 If a table cell has a number of textual paragraphs within it and the cursor is not on the first paragraph in the cell then setting the WPAT properties for border and fill affects neither the cell nor the textual paragraph. The obvious answer is to get the first paragraph in the cell and the obvious answer to that is use FirstSibling property. However, this always returns the second text para in the cell not the first! I have had a look at the source for this and it appears fine, but it just doesn't seem to loop back far enough to pick up the first para. I have had a look at the methods and properties for TParagraph and can't find any other one which will easily give me the first paragraph of the cell. I have tried using the activeparagraph.cell property but this does not appear to assist. Presumably the modifycellsonly property of TWPCharAttrInterface would work, but this is not the way I am approaching it. I need to go via ActiveParagraph.

    Regards

    Mark