Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 10-26-2016, 11:00 AM
Trailblazer Trailblazer is offline Mail Merge - Trailing Spaces Windows 10 Mail Merge - Trailing Spaces Office 2016
Novice
 
Join Date: Oct 2016
Posts: 2
Trailblazer is on a distinguished road
Default

I'm after something similar. We are sending output from a merge to a virtual printer which takes the output and puts it into our electronic document imaging system.

While the actual printout and print-to-PDF options work just fine, when sent to the generic/text only printer the table is converted to text, which is expected, but unless each column has the same number of spaces the alignment is messed up.

In other software like Excel this is easy to fix; I would change the field to be something like:

Code:
mergefield + space(80-len(field))

currently it looks like this:
Column1              Column2            Column3
Item1 desc           $1234                $123
Item2 description       $2341               $234
Item3              $4567         $456
I can't use len unfortunately. Another possible issue is that the mergefield is actually a collection of items separated with a CR/LF.

For example, <<item>> the merge field, when populated, looks like this:

Item Line1 CR/LF
Item Line2 with more info CR/LF
Item Line 3 still different length than Line1 & Line2 CR/LF

I need to add spaces after Line1 & Line2 so they -at least- match the length of Line3 (or some static character length that suits, like 80). Again, this is in order to make Column 2 line up and not be "jagged". I will need to repeat this for the other columns as well.

I don't believe I can have the user change the source data to match my requirements. I'm also fine if this requires some scripting in a macro, I'm just not sure how to get "there" from "here".
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge - Trailing Spaces From a beginner: Mail Merge using Windows Mail mhalpern705 Mail Merge 3 12-16-2011 04:58 AM
Mail Merge - Trailing Spaces New to mail merge help please Keith Mail Merge 2 11-03-2011 03:56 AM
Mail Merge - Trailing Spaces Comma style without trailing zeroes but with decimal part Scaffold Excel 3 10-22-2011 11:08 PM
Mail Merge - Trailing Spaces Saving INDV mail merges During the mail merge sedain121 Mail Merge 2 10-04-2011 07:52 PM
Mail Merge help aman Mail Merge 0 05-07-2010 03:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft