A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Excel link blocking Outlook



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 8th 12, 02:29 PM
Bob Allen-Turl Bob Allen-Turl is offline
Junior Member
 
First recorded activity at Outlookbanter: Jun 2012
Posts: 1
Default Excel link blocking Outlook

Apologies if this has been "done to death" numerous times but never having used Outlook I need all the help I can get.

The following programme was SUPPOSED to send e-mails and cc: mails through Outlook automatically. As shown on the worksheet I set it to mail two of my own addresses, one on Hotmail and one on my website.

Code:
Sub SendWithAtt()

Dim c As Range
Dim olApp As Outlook.Application
Dim olMail As MailItem
Dim CurrFile As String

Set olApp = New Outlook.Application
Set olMail = olApp.CreateItem(olMailItem)

Sheet1.Select

With olMail
For Each c In Range("STATUS")
    If c = "NO" Then
    .To = c.Offset(0, 4).Value
    .CC = c.Offset(0, 5).Value
    .Subject = c.Offset(0, 2).Value
    .Body = c.Offset(0, 3).Value
    .Send
    End If
Next
End With

    Set olMail = Nothing
    Set olApp = Nothing

End Sub
But running the routine a msgbox appears telling me “The network connection is temporarily unavailable and the message will be kept in the Outbox until the connection is restored”.

When I opened Outlook a msgbox said “We were unable to sign in to your account. Please try again, We currently cannot access your account. Please try again.”

So I opened up the Outbox, opened the first mail in the folder. , tried pressing “Send” and got the original Messagebox appearing.

Returned to Excel VBA code. Found programme highlighting the “To” field with a msgbox saying “RunTime Error 462. The remote server machine does not exist or is unavailable”.

So not only does my code not work, I seem to have "done something" to my Outlook!

Excel sheet is attached as a "screenprint" as I could not upload the Macro-enabled file.

Any guidance accepted gratefully

Bob Allen-Turl
Attached Images
File Type: jpg outlook_link.jpg (28.3 KB, 1 views)
Ads
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Link from Excel to Outlook ACT contacts file TishyMouse Outlook - Using Contacts 1 November 15th 07 03:37 PM
Link to Excel File on Outlook Form [email protected] Outlook - Using Forms 5 June 6th 07 04:59 PM
Link to open an Outlook object from an Excel spreadsheet [email protected] Outlook and VBA 2 June 6th 07 05:59 AM
How do I link Excel data to an Outlook Calendar? jrquebe Outlook - Calandaring 0 July 16th 06 04:30 PM
How can I link to an Outlook Contact from an Excel cel? jasonh1234 Outlook - Using Contacts 1 April 23rd 06 09:59 AM


All times are GMT +1. The time now is 04:41 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.