Problems with onClick Event

C

Curtis Stevens

I'm using this send to email command as an onclick event. The person's name
it is suppose to replace in the body email is Steven Santos, but it is
showing up as OReven Santos. I have tested others and they work like they
should. If I change the name in the record in the table it is using to
Curtis Santos, it puts the name in the email correctly. If I put XSteven
Santos, it uses XOReven Santos. Any idea why Access has a problem with the
ST in the name? If I change the name to Curtis Stevens, it uses Curtis
ORevens.

Const olMailItem = 0
txtDir = "C:\USMS\Emails\"

Set objoapp = CreateObject("Outlook.Application")
Set objOMessage = objoapp.CreateItem(olMailItem)
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso_OpenTextFile(txtDir & "AffiliateDeals", 1)

txtbody = ts.ReadAll
txtbody = FindAndReplace(txtbody, "ContactName", Me.ContactName)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top