Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MailMerge

Posted on 2016-07-20
5
Medium Priority
?
57 Views
Last Modified: 2016-07-21
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
Comment
Question by:RIAS
  • 3
  • 2
5 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 41721213
have you tried adding in your arguments:
MatchCase:=True

Open in new window

0
 

Author Comment

by:RIAS
ID: 41721216
Where to add it?
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 41721223
 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
 

Author Comment

by:RIAS
ID: 41721330
Will try and get back. Cheers
0
 

Author Closing Comment

by:RIAS
ID: 41722253
Thanks!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question