Jump to content

Recommended Posts

Posted

Hello,
I use the data merge function a lot to generate my company's email signatures (over 150 signatures). It turns out that in about fifty cases, the phone number field is empty because these people don't have a landline. Publisher therefore creates an empty field for this line. Unfortunately, my header is centered in height, and as a result, I have an empty line and my text isn't centered. Is there an automatic function to delete empty fields (like in InDesign) or is there a trick to do this?

Thank you for your attention.

Slywood.
(sorry for the automatic translation, I'm French, and like all French people, I'm very bad at English :D)

Posted

Welcome to the forums @slywood,

If the set up is like this then I would search for the blank line after the data merge and delete it. Use the Find an Replace function.

ScreenShot2025-04-23at8_15_49AM.png.998e4f6b953b391b816bb2119543108e.png

Then the text frame would have 4 lines centred, 3 lines centred, and 4 lines centred.

In Publisher I would include a Tab space after the Phone Field so I can search for a Paragraph Return followed by a Tab and then replace it with nothing.

ScreenShot2025-04-23at8_35_21AM.png.a46f80f7c760a95bcaaf88ad3942102f.png

======================

Here is a folder with a pair of files to play with.   untitled folder.zip   You'll most likely have to update the .CSV file so the Publisher document can find it.

 

=+=+=+=+=+=+=+=+=+=+=+=+

via DeepL.com

Bienvenue sur les forums @slywood,

Si la configuration est la même, je rechercherais la ligne vierge après la fusion des données et je la supprimerais. Utilisez la fonction Rechercher et remplacer.

 

Ensuite, le bloc de texte aura 4 lignes centrées, 3 lignes centrées et 4 lignes centrées.

 

Dans Publisher, j'inclurais un espace de tabulation après le champ téléphone afin de pouvoir rechercher un retour de paragraphe suivi d'une tabulation et de le remplacer par rien.

 

======================

 

Voici un dossier contenant deux fichiers avec lesquels vous pouvez jouer. untitled folder.zip Vous devrez probablement mettre à jour le fichier .CSV afin que le document Publisher puisse le trouver.

 

Traduit avec DeepL.com (version gratuite)

Mac Pro (Late 2013) Mac OS 12.7.6 
Affinity Designer 2.6.0 | Affinity Photo 2.6.0 | Affinity Publisher 2.6.0 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Posted

Hello, and thank you for your reply.
I had already thought of this kind of solution, but unfortunately it doesn't work because it doesn't delete the empty line. It does replace the character (tab or other) with nothing, but it doesn't delete the line :(

Posted
8 hours ago, slywood said:

I had already thought of this kind of solution, but unfortunately it doesn't work because it doesn't delete the empty line. It does replace the character (tab or other) with nothing, but it doesn't delete the line :(

I would need to see how you have set up your fields. If you are using separate Text Frames for each Field then my solution won't work. If you are using one Text Frame with new paragraphs between the fields then my suggestion will work.

Mac Pro (Late 2013) Mac OS 12.7.6 
Affinity Designer 2.6.0 | Affinity Photo 2.6.0 | Affinity Publisher 2.6.0 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Posted
On 4/24/2025 at 12:09 AM, slywood said:

... but it doesn't delete the line 

 

9 hours ago, slywood said:

voilà un exemple du fichier des signatures pour que vous puissiez voir la construction.

Here is something simple. I generate the file and then do a Find <Paragraph Mark><Space> and that will find the empty line, then I replace it with nothing. The text is now centred.

===========

Voici quelque chose de simple. Je génère le fichier, puis j'effectue une recherche dans <Marque de paragraphe><Espace>, ce qui permet de trouver la ligne vide, que je remplace ensuite par rien. Le texte est maintenant centré.

===========

Untitled document.zip

Mac Pro (Late 2013) Mac OS 12.7.6 
Affinity Designer 2.6.0 | Affinity Photo 2.6.0 | Affinity Publisher 2.6.0 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

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.