Results 1 to 2 of 2
  1. #1
    linoreale is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Oct 2014
    Posts
    10

    accented characters

    Hi,
    I'm using Access 2003 for sending emails via VBA using CDO as the code below.
    This system works fine but I noticed that the accented characters as ̣,à,́, etc are cutted or changed in the received email.
    How can I set an appropriate charset on this code?


    Dim db As Database, RS As Recordset
    Set db = CurrentDb
    Set RS = db.OpenRecordset("tabella", dbOpenDynaset)

    RS.MoveLast
    rstotale = RS.RecordCount

    msg = MsgBox("Si desidera inviare " & rstotale & " messaggi email relativi all'esito della seduta del " _
    & RS!data_visita, vbYesNo)
    If msg = vbNo Then
    Exit Sub
    Else

    Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory.
    Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network).
    Const cdoAnonymous = 0 'Do not authenticate
    Const cdoBasic = 1 'basic (clear-text) authentication
    Const cdoNTLM = 2 'NTLM

    RS.MoveFirst
    Do Until RS.EOF

    Set objmessage = CreateObject("CDO.Message")

    objmessage.Subject = "Seduta U. V. M. del " & RS!data_visita
    objmessage.From = """Unità di Valutazione Multidimensionale"" <mia mail.it>"
    objmessage.To = RS!email
    objmessage.TextBody = "Gentile dottore," & vbCrLf & "in data " & RS!data_visita _
    & " si è riunita l'Unità di valutazione multidimensionale " _
    & "che ha valutato la richiesta di " & RS!cognome & " " & RS!nome _
    & " con il seguente esito: " & vbCrLf & RS!esito

    objmessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/con...tion/sendusing") = 2

    objmessage.Configuration.Fields.Item _


    ("http://schemas.microsoft.com/cdo/con...ion/smtpserver") = "smtp.miosmtp.it"

    objmessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/con...tpauthenticate") = cdoBasic

    objmessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/con...n/sendusername") = "miamail.it"

    'Your password on the SMTP server
    objmessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/con...n/sendpassword") = "password"

    objmessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/con...smtpserverport") = 25

    objmessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/con...ion/smtpusessl") = False

    'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
    objmessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/con...nectiontimeout") = 60

    objmessage.Configuration.Fields.Update

    objmessage.Send

    RS.MoveNext
    Loop
    End If

    MsgBox "Inviate " & rstotale & " messaggi email!"

    end sub

    Thanks and Regards

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Most of what I could find concerns removing accents.

    Here is a thread that discusses adding special characters http://bytes.com/topic/access/answer...ted-characters
    But it doesn't really seem to do any more than you are already doing.

    Occurred to me HTML code tags might force the email to retain the accents but then read a thread that complained accented characters were garbled on a HTML web page.

    I don't know if there is a solution.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Text box with more than 255 characters
    By ssissons in forum Forms
    Replies: 6
    Last Post: 07-25-2014, 08:32 AM
  2. (bug) Chinese characters
    By JeroenMioch in forum Access
    Replies: 1
    Last Post: 08-09-2013, 09:15 AM
  3. Replies: 9
    Last Post: 02-11-2013, 03:09 PM
  4. How to count characters?
    By Jorge Junior in forum Access
    Replies: 1
    Last Post: 05-22-2011, 08:07 PM
  5. erase characters at the end
    By bjelinski in forum Access
    Replies: 14
    Last Post: 07-05-2010, 12:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums