View Single Post
  #16   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Running up against the limit in Excel 2003

FWIW in Mac office the support for getting data from Excel is much more
limited, but it does depend on which version of Mac Office you are talking
about. I don't think any version has the equivalent of ADO or DAO (on
Windows these both rely on Jet, which is the original engine used by Access,
and neither Access nor (AFAIK) Jet are part of Mac Office. Mac Word X let
you use ODBC to get data - whether there was a driver for Excel I couldn't
tell you. This support was dropped in Office 2004 (Excel could still use
ODBC to get data, but Word could not). I don't know where that stuff has
gone in Office 2008 but of course the main change there has been the
complete removal of VBA, which means (AFAIK) that you can only automate
these applications "from outside" the programs - e.g. you would have to
write a program - say in AppleScript - that automated both Word and Excel.
As far as I can remember, you can automate Excel 2004 from Word 2004 and get
data out of Excel, but as I said you wouldn't be able to use the precise
method Doug has suggested.


--
Peter Jamieson
http://tips.pjmsn.me.uk (Needs an update!)

"AndyC812" wrote in message
...
OK, so you think this will also fix my problem with Mac reports also? So
let
me see, I need to transpose my data tab, headers in A and data in B. Then
I
need to replace all of the merge fields in my report documents with
docvariable fields. Then I need to write a VBA procedure that will read
the
header, data pairs and send them to the correct Word template. Is that
all?
:-) Would it be asking too much for some sample code to get me started?
I
really appreciate you sticking with both of my questions!

-Andy

"Doug Robbins - Word MVP" wrote:

Yes. In fact it must be done with VBA.

--
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

"AndyC812" wrote in message
...
Docvariable fields! That sounds promising. I'll read up on those.
Could
I
use VBA to also drive the report generation in Word? I would like to
be
able
to push a button in the Excel file and have a "merged" report pop up in
Word
based on the field data in the spreadsheet.

"Doug Robbins - Word MVP" wrote:

In that case, you could have the "field names" in one column and the
data
for each "field" in the cells of the adjacted column and then you
would
not
be limited by the number of columns available.

Of course, you would then have to use something other than mailmerge
to
create the report and the way that I would do it would be to use
Docvariable
fields in the document in place of merge fields and use VBA to iterate
through the rows of the spreadsheet, creating variables in the
document
with
the name of the variables being the "field names" from the first
column
and
the values of the variables being set to the data from the
corresponding
cells in the second column.

--
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

"AndyC812" wrote in message
...
Just one report. Each spreadsheet generates one LONG reord of data
based
on
user input to the other worksheets.

"Doug Robbins - Word MVP" wrote:

Are you preparing multiple reports from the data or is it just one
report?

--
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

"AndyC812" wrote in message
...
My application has multiple tabs and generates a 7-9 page report
in
Word
using 250 merge fields. Not all the fields are used in all the
reports,
but
I'm running out of room. Others have suggested CSV also, but can
I
automate
it as well (generate the CSV from Excel and "Send it" to the
proper
merge
template and do a "Merge to New Document" and perhaps even rename
the
resulting file.

Thanks!

"Doug Robbins - Word MVP" wrote:

I find it hard to imagine a mail merge that needs that many
fields.
However, if you do need to exceed the 255 column limit of Excel,
you
can
use
a .csv file as the data source.

--
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

"AndyC812" wrote in message
...
I have created an application in Excel that collects data for
eventual
merging into a Word mail merge document. It is so large that
I
am
running
out of columns in Excel for new merge fields (I am using 250
of
possible
255). My question - is there a better way to get my data
fields
from
Excel
into Word (CSV file, XML?) ? Can this be automated?

Any tips would be appreciated!

Thanks!
Andy