• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 58
  • Last Modified:

MailMerge

Hello,
have this code which works fine.But it is not case sensitive in the search
 oDoc.Content.Find.Execute(FindText:="TO:",
                                      ReplaceWith:="TO: " & dtSQL.Rows(0)("Title").ToString & " " & dtSQL.Rows(0)("PatientName").ToString, Replace:=Microsoft.Office.Interop.Word.WdReplace.wdReplaceAll)

              Cheers!
0
RIAS
Asked:
RIAS
  • 3
  • 2
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
have you tried adding in your arguments:
MatchCase:=True

Open in new window

0
 
RIASAuthor Commented:
Where to add it?
0
 
Éric MoreauSenior .Net ConsultantCommented:
 oDoc.Content.Find.Execute(FindText:="TO:",
                                      ReplaceWith:="TO: " & dtSQL.Rows(0)("Title").ToString & " " & dtSQL.Rows(0)("PatientName").ToString, Replace:=Microsoft.Office.Interop.Word.WdReplace.wdReplaceAll, MatchCase:=True)

Open in new window

0
 
RIASAuthor Commented:
Will try and get back. Cheers
0
 
RIASAuthor Commented:
Thanks!
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now