selecting records in vb

F

Feng

Hi,

In Word 2002, you can select the records that you want to merge after you select the data source. I was wondering if this step can be automated through VB .net.

Thanks
Feng
 
P

Peter Jamieson

To replicate what Word does, you'll need to use the Mailmerge.DataSource
object, the Included property, ActiveRecord and wdFirstDataSourceRecord etc.
to select the current record.

--
Peter Jamieson
MS Word MVP

Feng said:
Hi,

In Word 2002, you can select the records that you want to merge after you
select the data source. I was wondering if this step can be automated
through VB .net.
 
F

Feng

Thank you
----- Peter Jamieson wrote: -----

To replicate what Word does, you'll need to use the Mailmerge.DataSource
object, the Included property, ActiveRecord and wdFirstDataSourceRecord etc.
to select the current record.

--
Peter Jamieson
MS Word MVP

Feng said:
select the data source. I was wondering if this step can be automated
through VB .net.
 
F

Feng

Actually, I was wondering how would you do this in Word 97, since the include property is not available.

Thanks
 
P

Peter Jamieson

Actually, I was wondering how would you do this in Word 97, since the
include property is not available.

Can't help with the VB.NET side, but the Included property isn't available
before Word 2002. So the only way to include/exclude records in earlier
versions is to eliminate them using the sort/filter features, and
programmatically that means you have to build the correct SQL string for the
data source being used. Further, you only have about 255/512 characters to
play with in the string so it may not always be feasible.

--
Peter Jamieson
MS Word MVP

Feng said:
Actually, I was wondering how would you do this in Word 97, since the
include property is not available.
 
F

Feng

Thanks, I think I will just use the firstrecord and lastrecord property of datasource and not worry about multiple ranges and excluding records then.

----- Peter Jamieson wrote: -----
Actually, I was wondering how would you do this in Word 97, since the
include property is not available.

Can't help with the VB.NET side, but the Included property isn't available
before Word 2002. So the only way to include/exclude records in earlier
versions is to eliminate them using the sort/filter features, and
programmatically that means you have to build the correct SQL string for the
data source being used. Further, you only have about 255/512 characters to
play with in the string so it may not always be feasible.

--
Peter Jamieson
MS Word MVP

Feng said:
Actually, I was wondering how would you do this in Word 97, since the
include property is not available.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top