Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent!!!!!!!!!!!!!

Status
Not open for further replies.

manjeetsingh

Programmer
Jul 9, 2002
6
IN
i am writing a mail merge program.problem,is
i want to sort the datasource,based on a field like
(CompanyName) and then there should be a option where
i could make a merged file containing companynames in a sorted order and between some range.
like companyname starting with 'A' to Companyname starting
with 'J' , CompanyName starting with 'K' to companyName
starting with 'Z' and so on.
Please help.

this is the datasource code i am using
--
objWord.MailMerge.OpenDataSource _
Name:="" & strDataSource & "", _
LinkToSource:=True, _
Connection:="TABLE " & strTableName & "", _
SQLStatement:="Select * from [" & strTableName & "] "

objWord.MailMerge.execute

--

note :- in the SQLStatement both 'where clause' and
'order by' clause are not working.








 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top