View Single Post
  #13   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Checkboxes on mailmerge recipients list

It's a bit pity that with this solution the checkstate would not be
consistent beetween Word's recipients list and my own list.


Yes...

It was my
goal to make this consistency sure at any time. But if you know this
approach is not that easy as to say (e.g.the filters...).


....at a certain point, I do not try to push Word, or the other components of
Office, or any other piece of complex software, too hard. If it does not
want to do a certain thing, the effort requied to make it do that thing
reliably is usually expensive. If you are coding in Word all the time, and
you have to support your code every day, then you probably learn what
actually works and what does not. I am not really in that position.

In this case, one thing you could try is to intercept the Edit Recipients
command (I'm not sure you can easily). If it is feasible, then at least you
should be able to tell that the user has used the Edit Recipients dialog
box, and at that point you may be able to check the current value of
..QueryString (if they have not changed it, of course!) inspect the values of
..Included, and bring "your" data into line with that. Perhaps that is what
you are already doing. Personally, I do not like intercepting commands at
all: Word provides a standard user interface, and I do not like altering an
experienced user's experience of that interface. Where it is feasible, I
would prefer to add stuff and tell them to use that instead. But I know that
is not always what is required in an organisation.

The other problem with adjusting your list to be in line with what they
specified is that it will always allow them to /exclude/ records, but it's
not so easy to see how they could re-include them usin gthe standard dialog.
Using your dialog, it should be feasible.

---
Peter Jamieson
http://tips.pjmsn.me.uk

"Steffen Grellmann" wrote in message
...
On Sat, 15 Dec 2007 18:12:32 -0000, "Peter Jamieson"
wrote:

The only other suggestion I can make is that if you are using a suitable
dialect of SQL (i.e. one that can do JOINs with something that you are
able
to create) then you could build a list of included record numbers and
store
it as a file, then do an Inner Join with whatever table/query you are
already using as a data source. Jet/ACE would probably support such a Join
even if the data was stored as (say) a delimited text file, although I
haven't actually tried that in Word.


Thank you Peter, this is another nice idea. I will think about it.
It's a bit pity that with this solution the checkstate would not be
consistent beetween Word's recipients list and my own list. It was my
goal to make this consistency sure at any time. But if you know this
approach is not that easy as to say (e.g.the filters...).

Or alternatively if the list of
included records is small enough that you don't exceed the 255/511
character
limit on qeury length, I suppose you could add

WHERE included_record_in IN (ID1,,ID)


Before I started this thread, I first thought Word is doing it
internally this way. But I cannot use WHERE because I'm at the 255/511
character limit right now and the amount of possible records is too
much.

Kind regards,

Steffen