www.webdeveloper.com
Results 1 to 5 of 5

Thread: Problem with VBScript not working after updating to Outlook 2010

  1. #1
    Join Date
    Feb 2010
    Location
    England
    Posts
    122

    Problem with VBScript not working after updating to Outlook 2010

    Hey everyone,

    I have the following code in VBScript.

    It works in Outlook 2001 but not in Outlook 2010.
    We are running XP SP3.

    Is there any code here that wouldn't be recognised by Outlook 2010, or for some reason break with the new version?

    Thanks.


    Code:
    On Error GoTo ErrorHandler
       
    Dim oApp As Object
    Dim oMail As Object
    Dim obody As String
    Dim strMail As String
    strMail = txtemail2.Text
    
    'Prepare the e-mail
    Set oApp = CreateObject("Outlook.Application")
    Set oMail = oApp.CreateItem(0)
    
    obody = obody & "<p style='font-family:arial;font-size:12'>"
    obody = obody & "<br />" & "<br />"
    obody = obody & "Thank you for submitting your vacancy. "
    
    
    With oMail
    .htmlbody = obody
    .To = strMail
    .Subject = "Your recent correspondence with us."
    .Attachments.Add Environ("TEMP") & "\temp.doc"
    .Importance = 2
    .Display
    End With
    
    Set oMail = Nothing
    Set oApp = Nothing
    
       
    Kill Environ("TEMP") & "\temp.doc"
     
        
        
        ActiveDocument.Undo (100)
            
    
    
    ErrorHandler:
    If Err.Number <> 0 Then
    MsgBox "Send unsuccessful. This may be due to exceeding your Outlook Storage Limit." _
        & vbCrLf & "If your inbox, deleted and sent items folders are full please delete or archive some items." _
        & vbCrLf & "Also please ensure your Team Leader email takes the format name.surname then try again." _
        & vbCrLf _
        & vbCrLf & "If you still receive this message please contact the Administrator:" _
        & vbCrLf & "joebloggs@hello.com", vbSystemModal + vbCritical, "Message Not Sent!"
        ActiveDocument.Undo (100)
    End If
    
    End Sub

  2. #2
    Join Date
    Mar 2009
    Posts
    452
    Check if you have VBA installed

  3. #3
    Join Date
    Feb 2010
    Location
    England
    Posts
    122
    Yep, definately.

  4. #4
    Join Date
    Sep 2012
    Posts
    4
    please I need someone to help me with this problem. I cant access my open cart admin. it keeps giving me this error and it has affected the web site as well. any help or solution
    Notice: unserialize() [function.unserialize]: Error at offset 44 of 65535 bytes in /home/lanre101/public_html/index.php on line 65

  5. #5
    Join Date
    Sep 2012
    Posts
    4

    I need urgent assistance.....I've got a deadline by saturday plsss help

    please I need someone to help me with this problem. I cant access my open cart admin. it keeps giving me this error and it has affected the web site as well. any help or solution
    Notice: unserialize() [function.unserialize]: Error at offset 44 of 65535 bytes in /home/lanre101/public_html/index.php on line 65

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles