Email failure with IE7 - InfoPath Dev
in

InfoPath Dev

Email failure with IE7

Last post 10-25-2010 12:26 AM by GazM. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-21-2010 06:18 AM

    • GazM
    • Top 200 Contributor
      Male
    • Joined on 11-09-2005
    • England
    • Posts 54

    Email failure with IE7

     

     

    Hi

    I have been using the VB code below to send custom email messages from a button control. Using IP2003, Office 2003 and IE6 this has worked fine for the last 5 years or so.

     

    Sub Respond_OnClick(eventObj)

    Set oOutlookApp = GetObject(, "Outlook.Application")
    If Err <> 0 Then
       Set oOutlookApp = CreateObject("Outlook.Application")
       bStarted = True
    End If

    Set oItem = oOutlookApp.CreateItem(olMailItem)

    With oItem
        'Set the recipient
       .To = "person@address"
       'Set the recipient for a copy
       '.CC = "[email protected]"
       'Set the subject
       .Subject = "New subject"
       'The content of the document is used as the body for the email
       .Body = "Info"
       'Add the document as an attachment, you can use the .displayname property
       'to set the description that's used in the message
       '.Attachments.Add Source:=ActiveDocument.FullName, Type:=olByValue, _
       '  DisplayName:="Document as attachment"
       .Send
    End With

    If bStarted Then
       oOutlookApp.Quit
    End If

    Recently some users have updated IE6 to IE7 or IE8 and the email buttons have stopped working. Outlook does not fire up and there are no error messages and no emails. I am guessing it is one of the settings in IE that needs to be changed.

    Any ideas

    Gary

  • 10-25-2010 12:10 AM In reply to

    Why do you need to use code to do this. InfoPath can send email via a data connection and that's the best practice. Do that and live with the extra popup. It's not so bad.

    Patrick Halstead
    Project Manager at Qdabra
  • 10-25-2010 12:26 AM In reply to

    • GazM
    • Top 200 Contributor
      Male
    • Joined on 11-09-2005
    • England
    • Posts 54

    Patrick

    I wish it was that simple. The code is used because I do not want to send the whole form in the email. I extract various bits of information from fields within the form to create the body of the email.

    Gary

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.