Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] 4m0h1w3uzib7cul@jetable.org is offline
external usenet poster
 
Posts: 2
Default Indicate a mailmerge record number before launching Word?

Using office 2003:

I have an Excel spreadsheet that is the source data for several
mailmerge documents. Within the spreadsheet, I have links to each of
these mailmerge documents. I would like to customize these links to
make word open the document AND select a designated record number for
the mailmerge. (I'll have a link to the word document for each row of
data, and by clicking on the right link, I'll pull up that same row's
data on the merged Word document.

Another way of asking this is this: Are there command line parameters
or VBScript commands that will allow a variable to be inserted into a
mailmerge template's record number?

I suspect I may need to alter the word document (change the record
number) before it is opened each time.

Switching to Access instead of Excel is not an option here.

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Cindy M -WordMVP- Cindy M  -WordMVP- is offline
external usenet poster
 
Posts: 370
Default Indicate a mailmerge record number before launching Word?

Using office 2003:

No command line parameters to do this.

One option could be to filter all records but the one you want to merge.
Link the Excel data source to the main merge document using DDE (not the
default 2003 OLE DB). Set up a filter in the main merge document to
merge only records where a particular field that you know always
contains data are "Not Blank". (DDE sees records that are filtered out,
but no field data; so only the visible records will be merged.)

The other option would be to use Automation (VBA) to open the main merge
document and set the QueryString property of the documents'
MailMerge.DataSource object. This would be a valid SQL SELECT statement
such as: "SELECT * FROM 'completepath.Excel.xls' WHERE myFieldName=1234"

I have an Excel spreadsheet that is the source data for several
mailmerge documents. Within the spreadsheet, I have links to each of
these mailmerge documents. I would like to customize these links to
make word open the document AND select a designated record number for
the mailmerge. (I'll have a link to the word document for each row of
data, and by clicking on the right link, I'll pull up that same row's
data on the merged Word document.

Another way of asking this is this: Are there command line parameters
or VBScript commands that will allow a variable to be inserted into a
mailmerge template's record number?

I suspect I may need to alter the word document (change the record
number) before it is opened each time.

Switching to Access instead of Excel is not an option here.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :-)

  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] 4m0h1w3uzib7cul@jetable.org is offline
external usenet poster
 
Posts: 2
Default Indicate a mailmerge record number before launching Word?

A follow up question:

I've decided the filtered DDE solution is the easiest for me. I now
have a column used to flag items to include in the mailmerge, and I put
a "1" in the selected row of this column before launching my mailmerge.
It works perfectly. Thanks! That problem had me stumped for a long
time.

Now I'd like to automate it further with a macro. I'll also be
scouring an excel programming group, but wondered if anyone here might
have some insight.

I want a macro that notices which row is active, places a "1" in the
Mailmerge column of that row, launches a hyperlink to the mailmerge
document, then replaces the "1" with null. The end result will allow
the user to select a row, click the macro titled "Mailmerge", and the
word document pops up with that row's data.

any suggestions?


One option could be to filter all records but the one you want to merge.
Link the Excel data source to the main merge document using DDE (not the
default 2003 OLE DB). Set up a filter in the main merge document to
merge only records where a particular field that you know always
contains data are "Not Blank". (DDE sees records that are filtered out,
but no field data; so only the visible records will be merged.)


I have an Excel spreadsheet that is the source data for several
mailmerge documents. Within the spreadsheet, I have links to each of
these mailmerge documents. I would like to customize these links to
make word open the document AND select a designated record number for
the mailmerge. (I'll have a link to the word document for each row of
data, and by clicking on the right link, I'll pull up that same row's
data on the merged Word document.


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
Reveal codes in a word document FUN101 Microsoft Word Help 4 May 16th 23 08:47 PM
Why dont MS just f**king re-write Word from scratch? Its dogsh*t Word Hater Microsoft Word Help 33 May 5th 23 02:52 PM
Change paper size; Word changes to invalid margins OhioTech New Users 10 July 6th 06 02:00 PM
3 different page number formats-How??!! cpatton Tables 3 April 24th 06 01:05 PM
In Word, how can I see all files (*.*) in "save as"? citizen53 New Users 8 April 4th 05 04:56 PM


All times are GMT +1. The time now is 08:05 AM.

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"