Solved

MailMerge

Posted on 2016-07-20
5
50 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

623 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