Consulting

Results 1 to 2 of 2

Thread: Publisher- create table links

  1. #1
    VBAX Newbie
    Joined
    Aug 2020
    Posts
    1
    Location

    Publisher- create table links

    I'm trying to automate some links in a Publisher table but I cannot seem to get the data from a cell to create the link.
    lnktxt will eventually have the full link but I cannot get the data from cell 8 on each row to generate the link. What am I doing wrong?
    (Windows 10, Microsoft 365)

    Sub AddLink()
        Dim conTabl As Table
        Dim conCell, lnkCell As Cell
        Dim lnktxt As TextRange
        lnkCol = 8
        With ActiveDocument.Pages(6).Shapes(2)
            For Each conCell In .Table.Cells
                conCellRow = conCell.Row
                If conCellRow > 1 Then 'skip headings
                    If conCell.Column = 1 Then
                        lnkCell = .Table.Cells(conCellRow, lnkCol) '<<<< I get anRun-time error 91 error here, I want the text in the cell
                        lnktxt = lnkCell.TextRange
                    End If
                End If
            Next conCell
        End With
    End Sub
    Last edited by Aussiebear; 12-31-2024 at 04:14 PM.

  2. #2
    It seems to me that it must work properly. Give me some time to test.

Tags for this Thread

Posting Permissions

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