Improve company productivity with a Business Account.Sign Up

x
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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