Results 1 to 4 of 4

Thread: Link Excel to Outlook 2003 Email

  1. #1
    Join Date
    Dec 2007
    Posts
    202

    Link Excel to Outlook 2003 Email

    Hi,

    I need a help: I created the code to send as e-mail addresses that will be added in the list. The code is functioning normally, but the only problem is that each sending a message:

    Code:
    Sub Email_var1() 
    Dim text As String 
    Dim name As String 
    Dim order As Long 
    end = Plan1.UsedRange.Rows.Count 
    name = Left (ActiveWorkbook.Name, Len (ActiveWorkbook.Name) - 4) 
    For line = 1 To order 
    text = Plan1.Cells (lin, 2). Value 
    ActiveWorkbook.SendMail Recipients: = text, Subject: = name 
    Next 
    End Sub
    Error Message: Program trying to send mail on your behalf. If this is unexpected, click deny and make sure your antivirus software is updated.

    For information about the security of email and how to avoid this warning, click Help.
    Allow Deny Help
    I click help and I find no guidelines on how to disable this warning. Have tried on various internet forums.

    Could someone help me?
    Thanks!

  2. #2
    Join Date
    May 2008
    Posts
    686

    Re: Link Excel to Outlook 2003 Mail

    I found a code on the internet that met your needs and I am providing below so that others who need to use.

    Code:
    Sub Email_var1() 
    Dim insert As String 
    Dim order As Long 
    end = Plan1.UsedRange.Rows.Count 
    insert Plan1.Cells = (2, 1) 
    For row = 3 To order 
    insert = insert & "" & Plan1.Cells (line, 1) 
    Next line 
    Set oOutlookApp = CreateObject ( "Outlook.Application") 
    Set oOutlookMessage = oOutlookApp.CreateItem (0) 
    With oOutlookMessage 
    . Subject = "TEST SHIPPING" 
    . To = insert 
    . display 
    Set = oOutlookMessage.Attachments Annex 
    anexo.Add "C:\Documents and Settings\user name\Desktop\PID OESTE.XLS CENTER",olByValue,1,"Test" 
    . Send 
    End With 
    End Sub

  3. #3
    Join Date
    Dec 2007
    Posts
    202

    Re: Link Excel to Outlook 2003 Mail

    A new question and found no answer ... which command should I add to this code so that after the message, the signature is added to HTML that I have within Outlook?

    If you can help me, thank you!

  4. #4
    Join Date
    May 2008
    Posts
    686

    Re: Link Excel to Outlook 2003 Mail

    I think your problem is not with the code or with Excel. The problem is with your e-mail program. If Outlook Express, for example, go to Tools/Options/Security

    there you will see that is empowered to: "Warn when a program attempts to send email "

    Excel To send your e-mail this icon must be disabled.

    If your e-mail program is another you will have to find this option there and disable it with certainty that the "default" will stop sending it (security).

Similar Threads

  1. Want to add a Excel Worksheet link on Outlook Message
    By New!life in forum MS Office Support
    Replies: 2
    Last Post: 24-02-2012, 12:14 PM
  2. Replies: 2
    Last Post: 02-11-2010, 10:46 AM
  3. How to set up Outlook 2003 for email
    By CrazeD in forum Windows Software
    Replies: 3
    Last Post: 18-08-2009, 11:00 AM
  4. Replies: 8
    Last Post: 16-01-2009, 06:54 PM
  5. Replies: 3
    Last Post: 25-09-2008, 08:37 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,491,890.07931 seconds with 16 queries