Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / February 2004

Tip: Looking for answers? Try searching our database.

How to merge 500 columns of data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chizz - 07 Feb 2004 00:07 GMT
I posted earlier and was not too clear on what I was trying t
accomplish.  I have two excel files set up and I am currently using 25
of the 255 columns of each one.  There is only one row of data, but
need a way to get 500 columns of data into a single spreadsheet so tha
i can merge all 500 peices of data with my word doc at once.  I a
currently using Office 2000.  Any help is greatly appreciated
Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS - 09 Feb 2004 08:05 GMT
Unfortunately, I believe that no matter which way you turn, you will run
into that 255 field/column limit.

Signature

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested.  Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP

>
> I posted earlier and was not too clear on what I was trying to
[quoted text clipped - 5 lines]
>
> ------------------------------------------------
Avi - 10 Feb 2004 00:16 GMT
Hi

Does the data have to be in Excel

I do a mailmerge with over 500 merge fields using a delimited word file as the merge source

Note: there is a bug in Word 2000/XP which  causes Word to crash when you have a large number (I do not recall what the number is) of merge fields and use the "normal" mail merge wizzard functions.  You can still use the older (query options).  This has been fixed in Word 2003
Cindy M  -WordMVP- - 10 Feb 2004 09:55 GMT
Hi =?Utf-8?B?QXZp?=,

> Note: there is a bug in Word 2000/XP which  causes Word to crash when you have a large number (I do not recall what the number is) of merge fields and use the "normal" mail merge
wizzard functions.  You can still use the older (query options).  This has been fixed in Word
2003

286 fields, and it comes from trying to display them in the Recipients dialog box :-)

> I do a mailmerge with over 500 merge fields using a delimited word file as the merge source.

I considered mentioning your suggestion, but then couldn't think of any reasonably easy way to
put the two Excel files together "side-by-side" in a plain text file. Do you have any
suggestions on that score?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply in the
newsgroup and not by e-mail :-)
Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS - 10 Feb 2004 13:00 GMT
Hi Cindy,

Something like this should do it (a modification of Ibby's code at
http://word.mvps.org/FAQs/InterDev/FillListBoxFromXLDAO.htm):

   Dim db1 As DAO.Database, db2 As DAO.Database
   Dim rs1 As DAO.Recordset, rs2 As DAO.Recordset
   Dim NoOfRecords As Long, i As Long, j As Long, flds1 As Long, flds2 As
Long
   Dim Target As Document
   ' Open the databases
   Set db1 = OpenDatabase("D:\Excel\Book1.xls", False, False, "Excel 8.0")
   Set db2 = OpenDatabase("D:\Excel\Book2.xls", False, False, "Excel 8.0")
   ' Retrieve the recordsets  Database1 and Database2 are named ranges in
Book1 and Book2 respectively
   ' The first row of the named range will not be brought in by this
procedure.  There for if it is desired to bring in
   ' the field names, insert a blank row before the row in which the
fieldnames appear and include that blank row
   ' in the named range.
   Set rs1 = db1.OpenRecordset("SELECT * FROM Database1")
   Set rs2 = db2.OpenRecordset("SELECT * FROM Database2")
   ' Determine the number of retrieved records
   With rs1
        .MoveLast
        NoOfRecords = .RecordCount
        .MoveFirst
   End With
   flds1 = rs1.Fields.Count
   flds2 = rs2.Fields.Count

   ' Create a document into which the information will be inserted
   Set Target = Documents.Add

   For i = 1 To NoOfRecords
       For j = 0 To flds1 - 1
           Target.Range.InsertAfter rs1.Fields(j) & ","
       Next j
       For j = 0 To flds2 - 2
           Target.Range.InsertAfter rs2.Fields(j) & ","
       Next j
       Target.Range.InsertAfter rs2.Fields(j) & vbCr
       rs1.MoveNext
       rs2.MoveNext
   Next i

   '  Clean up
   rs1.Close
   rs2.Close
   db1.Close
   db2.Close
   Set rs1 = Nothing
   Set rs2 = Nothing
   Set db1 = Nothing
   Set db2 = Nothing

Signature

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested.  Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP

> Hi =?Utf-8?B?QXZp?=,
>
[quoted text clipped - 26 lines]
> reply in the
> newsgroup and not by e-mail :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.