none
CrossReference Formatting RRS feed

  • Question

  • Greetings,

    Thanks to a previous post on this forum I have succeed to insert a Word CrossReference in a table. Now, i have an issue to format it.

    My crossReference is associated with a bookmark located in a table with only the top and bottom border visible.

    My problem is that this crossReference has the same style format of the table and that's not that I want.

    Is there a solution to disable the borders around the crossReference ?

    Thanks in advance.

    Roms

    Monday, May 14, 2012 1:06 PM

Answers

  • Hi Roms,

    Your description suggests you have bookmarked an entire table and are cross-referencing that, or that you're trying to cross-reference the content of a particular cell and have included the cell's end-of-cell marker in the bookmark. In the latter case, excluding the cell's end-of-cell marker from the bookmark should resolve the issue.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Monday, May 14, 2012 9:55 PM
  • Hi macropod,

    You are entirely right. I've made a mistake when I added the bookmark to my active document.
    The specified range was the range of the cell. I solve my problem by excluding the end-of-cell marker as you suggested.

    bookmarkRange.MoveEnd(Microsoft.Office.Interop.Word.WdUnits.wdCharacter, -1);
    Many thanks.
    • Marked as answer by Rom.S Tuesday, May 15, 2012 8:23 AM
    Tuesday, May 15, 2012 8:23 AM

All replies

  • Hi Roms

    Please show us the code you're using to create the cross reference.

    Please describe in more detail how the original information is structured and exactly what is carrying over to the cross-reference, and in what kind of structure the cross-reference is.

    Normally, a cross-reference is text, only. We need to understand why the cross-reference would include a table with table formatting - this is not usual.


    Cindy Meister, VSTO/Word MVP

    Monday, May 14, 2012 6:53 PM
    Moderator
  • Hi Roms,

    Your description suggests you have bookmarked an entire table and are cross-referencing that, or that you're trying to cross-reference the content of a particular cell and have included the cell's end-of-cell marker in the bookmark. In the latter case, excluding the cell's end-of-cell marker from the bookmark should resolve the issue.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Monday, May 14, 2012 9:55 PM
  • Hi macropod,

    You are entirely right. I've made a mistake when I added the bookmark to my active document.
    The specified range was the range of the cell. I solve my problem by excluding the end-of-cell marker as you suggested.

    bookmarkRange.MoveEnd(Microsoft.Office.Interop.Word.WdUnits.wdCharacter, -1);
    Many thanks.
    • Marked as answer by Rom.S Tuesday, May 15, 2012 8:23 AM
    Tuesday, May 15, 2012 8:23 AM
  • Hi Cindy Meister,

    Thank you for your help.
    Tuesday, May 15, 2012 8:26 AM