Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
jonnyb
 
Posts: n/a
Default word mailmerge field sort

Hi - I'm trying to apply a sort to a mailmerge field so that it automatically
sorts when the data is imported from a csv file. The field contains part
numbers (it can be anywhere from 1 to about 70 part numbers) and
unfortunately the product that creates the the csv does not have the
capability to sort on this particular field and I need them sorted ascending
for the process I am building.

Would anyone be able to let me know if this is possible, and maybe point me
in the right direction as to how I can accomplish this (code tips would be
much appreciated).

Thanks in advance - and please let me know if you need more details.

Jon
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default word mailmerge field sort

Open the csv file in Excel, sort it and save the sorted file to use as the
data source.

"jonnyb" wrote:

Hi - I'm trying to apply a sort to a mailmerge field so that it automatically
sorts when the data is imported from a csv file. The field contains part
numbers (it can be anywhere from 1 to about 70 part numbers) and
unfortunately the product that creates the the csv does not have the
capability to sort on this particular field and I need them sorted ascending
for the process I am building.

Would anyone be able to let me know if this is possible, and maybe point me
in the right direction as to how I can accomplish this (code tips would be
much appreciated).

Thanks in advance - and please let me know if you need more details.

Jon

  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
jonnyb
 
Posts: n/a
Default word mailmerge field sort

Thanks for the reply, but I guess I need to clarify - the csv file contains a
record for each transaction. In each record, there's a column that contains
part numbers for all of the items that were requested in the transaction.
All of these part numbers are contained in one cell of the record. I need to
sort the part numbers in each cell independently and each cell can contain
from 1 to 70 part numbers.

The solution provided would work if each record had a part number and I
wanted to sort all the records based on the part numbers, but unfortunately,
that's not the task that I need to accomplish.

"Doug Robbins - Word MVP" wrote:

Open the csv file in Excel, sort it and save the sorted file to use as the
data source.


  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default word mailmerge field sort

A csv file must mean something different to you than it does to me (and I
think most other people). For starters, it does not contain cells.

A CSV (comma-separated values) file contains the values in a table as a
series of ASCII text lines organized so that each column value is separated
by a comma from the next column's value and each record starts a new line.

Provide an example of the data in the file and we can probably tell you how
to go about it.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"jonnyb" wrote in message
...
Thanks for the reply, but I guess I need to clarify - the csv file
contains a
record for each transaction. In each record, there's a column that
contains
part numbers for all of the items that were requested in the transaction.
All of these part numbers are contained in one cell of the record. I need
to
sort the part numbers in each cell independently and each cell can contain
from 1 to 70 part numbers.

The solution provided would work if each record had a part number and I
wanted to sort all the records based on the part numbers, but
unfortunately,
that's not the task that I need to accomplish.

"Doug Robbins - Word MVP" wrote:

Open the csv file in Excel, sort it and save the sorted file to use as
the
data source.




  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
jonnyb
 
Posts: n/a
Default word mailmerge field sort

Doug - thanks again for the response.

A CSV file means the same thing to me as it does to the rest of world, and
you are correct that I don't actually have "cells", but I thought that using
the "cell" analogy would help explain the task at hand.

Here's an example of what I'm talking about (in csv format):

CSV format:

Order_ID, Customer_Name, Part_Numbers

Sample Data for above format:

"1001", "John Smith", "001" "010" "007"
"1002", "Jill Jones", "031" "002"
"1003", "Bill Williams", "014" "002" "001"

I need to sort the third value (Part_Numbers) so that they appear in
ascending order on my mailmerge document. It would be great if the data
could come to me with either one Part_Number per record (with multiple
records for each order) or with each Part_Number seperated by commas, but the
client is not willing to change this feed (I guess it's used to feed other
programs so they do not want to change anythng for risk of breaking something
else that uses the feed).

Any ideas?

I'm actually thinking about just telling the client that they're out of luck
unless they presort the Part_Numbers during the build of the csv file.

Jon


"Doug Robbins - Word MVP" wrote:

A csv file must mean something different to you than it does to me (and I
think most other people). For starters, it does not contain cells.

A CSV (comma-separated values) file contains the values in a table as a
series of ASCII text lines organized so that each column value is separated
by a comma from the next column's value and each record starts a new line.

Provide an example of the data in the file and we can probably tell you how
to go about it.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP




  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default word mailmerge field sort

If you want to send me a typical csv file, I can easily produce a macro that
will achieve what you want.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"jonnyb" wrote in message
...
Doug - thanks again for the response.

A CSV file means the same thing to me as it does to the rest of world, and
you are correct that I don't actually have "cells", but I thought that
using
the "cell" analogy would help explain the task at hand.

Here's an example of what I'm talking about (in csv format):

CSV format:

Order_ID, Customer_Name, Part_Numbers

Sample Data for above format:

"1001", "John Smith", "001" "010" "007"
"1002", "Jill Jones", "031" "002"
"1003", "Bill Williams", "014" "002" "001"

I need to sort the third value (Part_Numbers) so that they appear in
ascending order on my mailmerge document. It would be great if the data
could come to me with either one Part_Number per record (with multiple
records for each order) or with each Part_Number seperated by commas, but
the
client is not willing to change this feed (I guess it's used to feed other
programs so they do not want to change anythng for risk of breaking
something
else that uses the feed).

Any ideas?

I'm actually thinking about just telling the client that they're out of
luck
unless they presort the Part_Numbers during the build of the csv file.

Jon


"Doug Robbins - Word MVP" wrote:

A csv file must mean something different to you than it does to me (and I
think most other people). For starters, it does not contain cells.

A CSV (comma-separated values) file contains the values in a table as a
series of ASCII text lines organized so that each column value is
separated
by a comma from the next column's value and each record starts a new
line.

Provide an example of the data in the file and we can probably tell you
how
to go about it.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can Word display full path of a file in the title bar? SAsif Microsoft Word Help 1 January 26th 06 05:32 PM
Does Word have a QuickCorrect/Quick Word option like WordPerfect? CW New Users 2 December 20th 05 06:54 PM
In Word, how do I surpress headers and footers on page 2 Bill Microsoft Word Help 1 December 15th 05 07:13 PM
In Word, how can I see all files (*.*) in "save as"? citizen53 New Users 8 April 4th 05 04:56 PM
How do I create & merge specific data base & master documents? maggiev New Users 2 January 13th 05 12:30 AM


All times are GMT +1. The time now is 03:51 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"