#  Other Applications & Softwares  > Word Formatting & General >  >  Vertical Mailmerge

## collis

I have data coming into my mailmerge tags in a format similar to:
1
2
3
4
5
....etc

I want to have word convert the data however into:
1 2 3 4 5 ...etc

I've tried using /v in my merge tag however this only changes the text into Asian script
The data is being presented in a table something like this:
Line 1
{Tag 1}

line 2
{Tag 2}

line 3
{tag 3}



What i need to know, is how to convert the merge field to keep the text presented vertically aligned allowing a horizontal table?
I dont want to covert the layour of the table if i can help it as this will complicate forms that I am creating.



For background, the data is being presented via a csv file generated in an oracle database.
the merge fields are receiving data something like this:
Tag1 = 1
           2
           3
           4
           5
           6
tag10 = text here
tag2 = 1
          2
          3
          4
          5
          6
          7
tag5 = more text




Thanks all.

----------


## macropod

Your problem and data descriptions are unclear. Perhaps you could attach both a copy of the document you're trying to create and the mailmerge data source to a post (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.

----------


## collis

> Your problem and data descriptions are unclear. Perhaps you could attach both a copy of the document you're trying to create and the mailmerge data source to a post (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.



If i did that, the upload would be practically blank.


I'll try and make myself clear.
We have an sql that when it runs, it returns multiple rows in 1 merge field.
We want to be able to present this data, whilst I can leave it as normal, word presents the data how it is generated, in a horizontal list. I want to force the field to be presented in word vertically to accommodate for forms that we have on our sheet.

I've tried using /V on my merge field, however as this is there mostly for Asian fonts, this converts the inbound text into an Asian script and is therefore of no use to us.
is there any other tags that i can use or table formatting to force the text to be vertical aligned yet still human readable?

Thanks

----------


## macropod

Unless the field you're referring to is a DATABASE field, NOT a MERGEFIELD, it is not possible for an SQL to output multiple results in a single field.

As I said, your problem and data descriptions are unclear. Far from clear, actually. I don't really care that the upload would be 'practically blank' - I need to see what you're working with, since your descriptions have given me nothing I (or anyone else) can work with.

----------


## collis

From the database, we have a program that runs an extract into a csv file.
The program then calls with word mailmerge api and merges the flat csv file into the a template docx file.
the fields I am dealing with are mergefields not database files.
I know in the table that the data gets put into, you can change the text alignment by 90 degrees, however this then becomes unreadable, so i need a way to either:
a) rotate the text on the mergefield with the table set to align vertical.
b) replace the carriage returns/line feeds with a space/tab.

i'm sure that one of these options can be programed into the template file so that my desired output is achieved.

----------


## macropod

If you're not willing to post either a representative CSV file or the document into which you want the data merged, there is nothing more I or anyone else can do to help you.

The ball's in your court.

----------


## collis

> If you're not willing to post either a representative CSV file or the document into which you want the data merged, there is nothing more I or anyone else can do to help you.
> 
> The ball's in your court.



I've attached a sample document and a test csv, this is what i've been using to develop my forms to accomodate everything that is needed.
I'm looking at the section Multi 1 / 2

once i've got my test file working how i want it, i can get the final template working correctly.

Thanks

----------


## macropod

Your data file is by no means a standard CSV file, where each record begins on a new line and all the data for a single record are on the same line.

Unless you modify the data file, presumably by altering the SQL code that produces it, so that each multi1 & multi2 item is in a separate field (the same applies to any other items you want on a single line), you will not be able to get the results you're after via a mailmerge.

You could, of course write some VBA code that modifies the CSV file pre-merge, or the output document post-merge, but it's more logical to do it at the source and a post-merge solution wouldn't be viable if the output is going direct to printer or email, for example.

----------


## collis

> Your data file is by no means a standard CSV file, where each record begins on a new line and all the data for a single record are on the same line.
> 
> Unless you modify the data file, presumably by altering the SQL code that produces it, so that each multi1 & multi2 item is in a separate field (the same applies to any other items you want on a single line), you will not be able to get the results you're after via a mailmerge.
> 
> You could, of course write some VBA code that modifies the CSV file pre-merge, or the output document post-merge, but it's more logical to do it at the source and a post-merge solution wouldn't be viable if the output is going direct to printer or email, for example.



Unfortunately with the way that the mailmerge is called, it needs to be done at the mailmerge state so ideally needs to be on the field.

----------


## macropod

As I have already said:




> *Unless you modify the data file*, presumably by altering the SQL code that produces it, so that each multi1 & multi2 item is in a separate field (the same applies to any other items you want on a single line), *you will not be able to get the results you're after via a mailmerge*.

----------

