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

Off-Line access to email via VBA



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 14th 06, 06:19 PM posted to microsoft.public.outlook.program_vba
Nigel RS
external usenet poster
 
Posts: 16
Default Off-Line access to email via VBA

I have a laptop PC that connects to a microsoft exchange server via a VPN.
When connected I can attach files from the laptop pc to an email using VBA in
Excel. All works OK.
If I operate the PC without VPN conection my file attachment program fails
with unable to access datastore error.

Is this an outlook error as it cannot create an email item ?

Cheers
Nigel RS
Ads
  #2  
Old August 14th 06, 06:32 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Off-Line access to email via VBA

When you're not connected, can you open Outlook manually? If not, then maybe you need to change your Outlook configuration so you can work offline.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Nigel RS" wrote in message news
I have a laptop PC that connects to a microsoft exchange server via a VPN.
When connected I can attach files from the laptop pc to an email using VBA in
Excel. All works OK.
If I operate the PC without VPN conection my file attachment program fails
with unable to access datastore error.

Is this an outlook error as it cannot create an email item ?

Cheers
Nigel RS

  #3  
Old August 14th 06, 06:50 PM posted to microsoft.public.outlook.program_vba
Nigel RS
external usenet poster
 
Posts: 16
Default Off-Line access to email via VBA

Hi Sue
Since I created the thread I discovered that I cannot open outlook manually
when off-line, but other PC uses of the network can. I will try it on one
that can open outlook and get my pc reconfigured if that works

Thanks
Nigel RS

"Sue Mosher [MVP-Outlook]" wrote:

When you're not connected, can you open Outlook manually? If not, then maybe you need to change your Outlook configuration so you can work offline.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Nigel RS" wrote in message news
I have a laptop PC that connects to a microsoft exchange server via a VPN.
When connected I can attach files from the laptop pc to an email using VBA in
Excel. All works OK.
If I operate the PC without VPN conection my file attachment program fails
with unable to access datastore error.

Is this an outlook error as it cannot create an email item ?

Cheers
Nigel RS


  #4  
Old August 15th 06, 02:26 PM posted to microsoft.public.outlook.program_vba
Nigel RS
external usenet poster
 
Posts: 16
Default Off-Line access to email via VBA

Hi Sue
That fixed it. I also added a error handler that detects if the attempt to
create an email fails which works great.

Another question: when I attempt to create the email in an off-line
situation the dialog Exchange Server is offline with the option Retry,
Offline or Cancel opens. I presume this is an outlook dialog? If it is can
and how do I interact with this - e.g. user presses Cancel or create Offline
etc from within Excel?.

Cheers
Nigel RS


"Nigel RS" wrote:

Hi Sue
Since I created the thread I discovered that I cannot open outlook manually
when off-line, but other PC uses of the network can. I will try it on one
that can open outlook and get my pc reconfigured if that works

Thanks
Nigel RS

"Sue Mosher [MVP-Outlook]" wrote:

When you're not connected, can you open Outlook manually? If not, then maybe you need to change your Outlook configuration so you can work offline.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Nigel RS" wrote in message news
I have a laptop PC that connects to a microsoft exchange server via a VPN.
When connected I can attach files from the laptop pc to an email using VBA in
Excel. All works OK.
If I operate the PC without VPN conection my file attachment program fails
with unable to access datastore error.

Is this an outlook error as it cannot create an email item ?

Cheers
Nigel RS


  #5  
Old August 15th 06, 02:57 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Off-Line access to email via VBA

If the user clicks Cancel, you should get an error, which you'll need to handle, when you try to create an email message. If the user chooses Offline, your code will be able to create and send email messages, but they won't be transmitted to the server until the user synchronizes with the server from the offline session or restarts Outlook in an online session.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Nigel RS" wrote in message ...
Hi Sue
That fixed it. I also added a error handler that detects if the attempt to
create an email fails which works great.

Another question: when I attempt to create the email in an off-line
situation the dialog Exchange Server is offline with the option Retry,
Offline or Cancel opens. I presume this is an outlook dialog? If it is can
and how do I interact with this - e.g. user presses Cancel or create Offline
etc from within Excel?.

"Nigel RS" wrote:

Hi Sue
Since I created the thread I discovered that I cannot open outlook manually
when off-line, but other PC uses of the network can. I will try it on one
that can open outlook and get my pc reconfigured if that works

Thanks
Nigel RS

"Sue Mosher [MVP-Outlook]" wrote:

When you're not connected, can you open Outlook manually? If not, then maybe you need to change your Outlook configuration so you can work offline.

"Nigel RS" wrote in message news I have a laptop PC that connects to a microsoft exchange server via a VPN.
When connected I can attach files from the laptop pc to an email using VBA in
Excel. All works OK.
If I operate the PC without VPN conection my file attachment program fails
with unable to access datastore error.

Is this an outlook error as it cannot create an email item ?


  #6  
Old August 15th 06, 03:18 PM posted to microsoft.public.outlook.program_vba
Nigel RS
external usenet poster
 
Posts: 16
Default Off-Line access to email via VBA

Thanks Sue, I have through my current error-handler detecting this
situation. My real question should have been how can I detect if the user is
on-line or off-line before I attempt to create an email?

I had an idea to try to create an email in background (unknown to user),
detect the error( if any) and use this to control the user dialog in my
application. But the Outlook dialog appears, in off-line mode, and this
causes a user interaction that I want to avoid.

Thanks

"Sue Mosher [MVP-Outlook]" wrote:

If the user clicks Cancel, you should get an error, which you'll need to handle, when you try to create an email message. If the user chooses Offline, your code will be able to create and send email messages, but they won't be transmitted to the server until the user synchronizes with the server from the offline session or restarts Outlook in an online session.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Nigel RS" wrote in message ...
Hi Sue
That fixed it. I also added a error handler that detects if the attempt to
create an email fails which works great.

Another question: when I attempt to create the email in an off-line
situation the dialog Exchange Server is offline with the option Retry,
Offline or Cancel opens. I presume this is an outlook dialog? If it is can
and how do I interact with this - e.g. user presses Cancel or create Offline
etc from within Excel?.

"Nigel RS" wrote:

Hi Sue
Since I created the thread I discovered that I cannot open outlook manually
when off-line, but other PC uses of the network can. I will try it on one
that can open outlook and get my pc reconfigured if that works

Thanks
Nigel RS

"Sue Mosher [MVP-Outlook]" wrote:

When you're not connected, can you open Outlook manually? If not, then maybe you need to change your Outlook configuration so you can work offline.

"Nigel RS" wrote in message news I have a laptop PC that connects to a microsoft exchange server via a VPN.
When connected I can attach files from the laptop pc to an email using VBA in
Excel. All works OK.
If I operate the PC without VPN conection my file attachment program fails
with unable to access datastore error.

Is this an outlook error as it cannot create an email item ?



  #7  
Old August 15th 06, 03:43 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Off-Line access to email via VBA

You can't really know until Outlook starts. The user could even have Outlook set up to *always* prompt whether to work in online or offline mode, regardless of the VPN status.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Nigel RS" wrote in message news
Thanks Sue, I have through my current error-handler detecting this
situation. My real question should have been how can I detect if the user is
on-line or off-line before I attempt to create an email?

I had an idea to try to create an email in background (unknown to user),
detect the error( if any) and use this to control the user dialog in my
application. But the Outlook dialog appears, in off-line mode, and this
causes a user interaction that I want to avoid.

Thanks

"Sue Mosher [MVP-Outlook]" wrote:

If the user clicks Cancel, you should get an error, which you'll need to handle, when you try to create an email message. If the user chooses Offline, your code will be able to create and send email messages, but they won't be transmitted to the server until the user synchronizes with the server from the offline session or restarts Outlook in an online session.


"Nigel RS" wrote in message ...
Hi Sue
That fixed it. I also added a error handler that detects if the attempt to
create an email fails which works great.

Another question: when I attempt to create the email in an off-line
situation the dialog Exchange Server is offline with the option Retry,
Offline or Cancel opens. I presume this is an outlook dialog? If it is can
and how do I interact with this - e.g. user presses Cancel or create Offline
etc from within Excel?.

"Nigel RS" wrote:

Hi Sue
Since I created the thread I discovered that I cannot open outlook manually
when off-line, but other PC uses of the network can. I will try it on one
that can open outlook and get my pc reconfigured if that works

"Sue Mosher [MVP-Outlook]" wrote:

When you're not connected, can you open Outlook manually? If not, then maybe you need to change your Outlook configuration so you can work offline.

"Nigel RS" wrote in message news I have a laptop PC that connects to a microsoft exchange server via a VPN.
When connected I can attach files from the laptop pc to an email using VBA in
Excel. All works OK.
If I operate the PC without VPN conection my file attachment program fails
with unable to access datastore error.

Is this an outlook error as it cannot create an email item ?



  #8  
Old August 15th 06, 04:20 PM posted to microsoft.public.outlook.program_vba
Nigel RS
external usenet poster
 
Posts: 16
Default Off-Line access to email via VBA

Thanks - what a pity! I always try to avoid un-neccessary user interaction
but it seems I am stuck with this one.

Cheers
Nigel

"Sue Mosher [MVP-Outlook]" wrote:

You can't really know until Outlook starts. The user could even have Outlook set up to *always* prompt whether to work in online or offline mode, regardless of the VPN status.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Nigel RS" wrote in message news
Thanks Sue, I have through my current error-handler detecting this
situation. My real question should have been how can I detect if the user is
on-line or off-line before I attempt to create an email?

I had an idea to try to create an email in background (unknown to user),
detect the error( if any) and use this to control the user dialog in my
application. But the Outlook dialog appears, in off-line mode, and this
causes a user interaction that I want to avoid.

Thanks

"Sue Mosher [MVP-Outlook]" wrote:

If the user clicks Cancel, you should get an error, which you'll need to handle, when you try to create an email message. If the user chooses Offline, your code will be able to create and send email messages, but they won't be transmitted to the server until the user synchronizes with the server from the offline session or restarts Outlook in an online session.


"Nigel RS" wrote in message ...
Hi Sue
That fixed it. I also added a error handler that detects if the attempt to
create an email fails which works great.

Another question: when I attempt to create the email in an off-line
situation the dialog Exchange Server is offline with the option Retry,
Offline or Cancel opens. I presume this is an outlook dialog? If it is can
and how do I interact with this - e.g. user presses Cancel or create Offline
etc from within Excel?.

"Nigel RS" wrote:

Hi Sue
Since I created the thread I discovered that I cannot open outlook manually
when off-line, but other PC uses of the network can. I will try it on one
that can open outlook and get my pc reconfigured if that works

"Sue Mosher [MVP-Outlook]" wrote:

When you're not connected, can you open Outlook manually? If not, then maybe you need to change your Outlook configuration so you can work offline.

"Nigel RS" wrote in message news I have a laptop PC that connects to a microsoft exchange server via a VPN.
When connected I can attach files from the laptop pc to an email using VBA in
Excel. All works OK.
If I operate the PC without VPN conection my file attachment program fails
with unable to access datastore error.

Is this an outlook error as it cannot create an email item ?



 




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
Access to the Address book through VBA? Morten Pahle Outlook - Using Contacts 1 July 17th 06 04:07 PM
How to access user defined fields through VBA Oliver Gräser Outlook - Using Forms 6 June 8th 06 04:15 PM
VBA Code to put in Access that will send an Email with Attachments [email protected] Outlook and VBA 1 April 9th 06 06:30 PM
Using VBA for Outlook and VBA for Access within Access Sardonic Outlook and VBA 1 March 17th 06 01:34 PM
Delete Custom Outlook Control thru Access VBA Sue Mosher [MVP-Outlook] Outlook - Using Forms 0 January 20th 06 06:29 PM


All times are GMT +1. The time now is 07:12 AM.


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.