Results 1 to 4 of 4
  1. #1
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480

    Email doublespacing, vba assist

    So the code below is working flawlessly.. With one small exception. When a user types in the email this opens, it is by default choosing to be double spaced, A few users have made an issue of this. I looked through a list of variables and nothing jumped out at me, A couple body options, but nothing I am familiar with. Any Ideas?



    Code:
      Sub CreateMail()
          
        Dim olApp As Outlook.Application
        Dim objMail As Outlook.MailItem
        Set olApp = Outlook.Application
        'Create e-mail item'
        Set objMail = olApp.CreateItem(olMailItem)
        Dim oservman As InternetExplorer
        Dim client, aClient, ClientNum, Probloc, SMmail, Sum, Desc, SD As String
        Dim iQLS As Long
       
        Set oservman = GetServMan
        Set otest = New clsSmselect
    On Error GoTo MailErr
        otest.SMselect oservman
     
        Set oservman = GetServMan
      
            client = otest.client
            Probloc = otest.Probloc
            SMmail = otest.SMmail
            Sum = otest.Sum
            Desc = otest.Desc
            SD = otest.SD
     
        Set oservman = Nothing
              ''' Assigning the things above in outlook mail message.
          With objMail
            .Subject = client & " / " & Sum & " / " & SD
            .Body = "Ticket Notes: " & Desc
            .To = SMmail
            .Display
            .ReadReceiptRequested = True
            
          End With
          Exit Sub
    MailErr:
       MsgBox "The class objects are unable to be determined, so the email cannot autopopulate your notes.", , "YOU BROKE IT"
       
      End Sub

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    The body text is double spacing?

    What is data like in the Desc field? Any embedded CrLf's?
    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.

  3. #3
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Yea the body text is double spacing.

    No, they are just text boxes from another program I have defined in a separate class module

    Funny thing, all the data it is importing is coming over single spaced, but when the rep types anything manually it is by default double spaced

  4. #4
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Figured it out

    Code:
    .bodyformat = 3   '1 = plain text, 2 = html (also default), 3 = RichText
    So, I can make the format into plain text or richtext. This will eliminate the double spacing issue that comes with HTML formatted emails.

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

Similar Threads

  1. Senseless, but please assist
    By djclntn in forum Queries
    Replies: 7
    Last Post: 11-21-2011, 07:02 PM
  2. Assist to create Data Macro
    By rkalapura in forum Programming
    Replies: 3
    Last Post: 07-30-2011, 11:12 AM
  3. Please assist on this task. I'm stuck.
    By Playerpawn in forum Access
    Replies: 3
    Last Post: 05-17-2011, 01:31 PM
  4. Replies: 4
    Last Post: 04-13-2011, 10:11 AM
  5. **I need Help with EXCEL. Please Assist**
    By n in forum Import/Export Data
    Replies: 0
    Last Post: 06-23-2006, 10:08 AM

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