Consulting

Results 1 to 8 of 8

Thread: How to insert a bookmark in a table

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Newbie
    Joined
    Jan 2024
    Posts
    3
    Location

    How to insert a bookmark in a table

    Hi there,

    I'm trying to insert a previosly defined Bookmark in a specific Cell in the Table of my Header by using VBA.

    here's what im working with:

    ActiveDocument.Sections(2).Headers(wdHeaderFooterPrimary).Range.Tables(1).Cell(3, 4).Range.InsertCrossReference ReferenceType:="Textmarke", ReferenceKind:=wdContentText, ReferenceItem:="Date", InsertAsHyperlink:=True
    Strangely this command adds the Reference at the Cell 1,3 and deletes the content of Cell 3,4.

    First sreenshot shows the wanted result. The second shows what the macro is doing.

    What am I doing wrong?
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •