Jump to content

How to create a hyperlink or bookmark to pages created during Data Merge?


Recommended Posts

First-time Affinity Publisher user here. I am creating a custom table of contents that links "Page 3" to page 3, etc. But some of the pages I need to link to will only be created after Data Merge. I have 2 different data merges in the same file.

Specifically, I want to link to "House Bills". House Bills is page 7 in my Publisher file, but there is a data merge before that, so after data merge, it becomes page 15. If there's a way to link to "House Bills" regardless of what page number it is, that would be great.

In addition, but not as important, I would like a placeholder field that automatically updates upon data merge with actual page numbers. I.e., in my table of contents, I am hard-coding the # 15 because as of now, that's where House Bills ends up. But that could change, and I would like the data-merged document to automatically update to whatever the page is. However, if this is too tricky, please don't hesitate in answering the rest of the question.

Since I am new, I don't know the differences between hyperlinks, bookmarks, cross-references, anchors, etc., so if you could kindly respond assuming I know nothing, that would be great! :)

CleanShot 2024-09-25 at 10.44.46@2x.png

Link to comment
Share on other sites

Hi @heyfletch and welcome to the forums,

You would be better off inserting a Table of Contents after you've run both your data merges, which will, once formatted, using the relevant text styles automatically insert the correct page numbers with hyperlinks (remember to add a checkmark against 'Include Hyperlinks' in the PDF Export menu when exporting your file) and automatically update those page numbers should things change in your document when you select 'Update' in the Table of Contents Panel...

For a guide on creating a Table of Contents, you could refer to @MikeTO's free unofficial Publisher guide which you can download here starting on Page 208...

Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5
Affinity Designer Beta 2.6.0.2861 | Affinity Photo Beta 2.6.0.2861 | Affinity Publisher Beta 2.6.0.2861

MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

Link to comment
Share on other sites

Hey thanks, for your response. Just so I understand, are you saying I would need to first do the Data Merge which creates a new file, and THEN insert a TOC? Or, can I create the TOC in the main Publisher doc, run the data merge, and then UPDATE the TOC? Because the former doesn't seem easier than me just going into the data-merged document and just updating the #s. If I'm understanding correctly. 

Link to comment
Share on other sites

Hi @heyfletch,

You would need to do Data Merge One with your source file and then save the Data Merged file under a new name and then run Data Merge Two on the first Data Merged file Save that as a second file under a new name and then insert the TOC on the file with both Data Merges...

AFAIK, it's not currently possible to run multiple Data Merges on the same file...

Once you have your second Data Merged file insert your TOC and it will automatically populate your file with the correct hyperlinked page numbers once exported to PDF with Include Hyperlinks ticked...

Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5
Affinity Designer Beta 2.6.0.2861 | Affinity Photo Beta 2.6.0.2861 | Affinity Publisher Beta 2.6.0.2861

MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

Link to comment
Share on other sites

4 minutes ago, Hangman said:

AFAIK, it's not currently possible to run multiple Data Merges on the same file...

Actually, this is what I'm already doing. I have one XLSX, but added twice to the Data Merge Manager (I've also done it with 2 different files, but one file seems more stable). In my main Publisher doc, I have 2 data merge grids. So, one Generate does all the data merging I need.

Would that change your recommendation? I read the TOC guide per your suggestion, and that's a lot more work formatting headings, etc. than what I current have... which is just 4 simple hyperlinks to where I need to go... I just would like a way to automatically update the page numbers.

Link to comment
Share on other sites

7 minutes ago, heyfletch said:

Actually, this is what I'm already doing. I have one XLSX, but added twice to the Data Merge Manager (I've also done it with 2 different files, but one file seems more stable). In my main Publisher doc, I have 2 data merge grids. So, one Generate does all the data merging I need.

Ah okay, if you have two Data Merge Grids then yes, that will work... I was thinking your layout was different than it is...

To be honest the TOC part is really straightforward once you try it and it's the only way to automatically update page numbers... If you only have the four items to hyperlink you could add the hyperlinks manually once you have confirmed page numbers after the two data merges but I believe there is a bug in the current version of Publisher that invalidates page hyperlinks if the target page is moved which may (I'm unsure) impact your file, you'd have to test it to be certain...

Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5
Affinity Designer Beta 2.6.0.2861 | Affinity Photo Beta 2.6.0.2861 | Affinity Publisher Beta 2.6.0.2861

MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

Link to comment
Share on other sites

Ok, sounds good. I'll probably start with a TOC for future projects now that I understand more, but will attempt to just manually do the hyperlinks for this smaller one since it's just a couple I need to update. I'll be on the lookout for the hyperlink issues you mentioned. Thanks Hangman!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.