Re: VBA access for HTTP folders (MSN/Hotmail)
- From: "Michael Bauer [MVP - Outlook]" <mb@xxxxxxxx>
- Date: Sat, 9 Dec 2006 09:57:49 +0100
Correct, it isn't.
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --
Am Fri, 8 Dec 2006 09:46:02 -0800 schrieb Rayo K:
Thank you. It appears to work great.first
Incidentally, I tried to use the "Try...Catch...Finally" structure at
and it did not seem to work. I suppose this is not supported in VBA?line
"Michael Bauer [MVP - Outlook]" wrote:
There're two possibilities:
'On Error Resume Next' ignores the error and you can check in the next
that).of code if an error occured. See my first sample.
'On Error Goto AnyName' jumps to a xxx (I don't know how to translate
soonThat would look like this:
On Error Goto AnyName
' code here that raises an error
' more code here but these line won't be executed
AnyName: ' this is the xxx. Note that it ends with a double point!
' here the execution goes on
Both methods are possible if you want to leave the procedure. In my first
sample you could add a line like this:
If Err.Number Then
itemCopy.Delete
Set itemCopy = Nothing
Exit Sub
Endif
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --
Am Thu, 7 Dec 2006 05:10:01 -0800 schrieb Rayo K:
Thanks. That works, but now i would like to terminate the program as
(Ias
it finds it is offline. I think it should look something like this:
If FCopy Then
'If the server is not connected, it will not copy the email
*** On Error Goto [?] **************
Set itemCopy = item1.Copy
If Err.Number Then
itemCopy.Delete
Set itemCopy = Nothing
Else
itemCopy.Move folder2
totalCopied = totalCopied + 1
End If
'item1.Copy.Move folder2
'totalCopied = totalCopied + 1
End If
I'm not familiar with the Goto clause. What do I need to put after goto
thewant to stop the program and create a message box stating the folder is
offline)
\
Thanks
-Rayo
"Michael Bauer [MVP - Outlook]" wrote:
For instance:
On Error REsume Next
Dim Copy as MailItem
Set Copy=Item.Copy
If Err.Number Then
Copy.Delete
Set Copy=Nothing
Else
Copy.Move ...
Endif
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --
Am Wed, 6 Dec 2006 11:07:02 -0800 schrieb Rayo K:
Thanks.
I thought about that and it could probably work. The problem is that
itthaterror only occurs when I use the item.copy.move method. The result is
the code terminates with a copy already made (I don't understand why
knowexecutes,can
copy an email into the folder but not move it).
So I need to 'trigger' a potential error event before that code
without actually changing anything if the error occurs. So I don't
yourhow
to apply an error handler to this situation. Any ideas?
-Rayo
"Michael Bauer [MVP - Outlook]" wrote:
Do you use an error handler? A simply On Errot Goto should prevent
computer).code
accountfrom "crashing".
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --
Am Tue, 5 Dec 2006 06:01:01 -0800 schrieb Rayo K:
I have a macro that synchronizes my Outlook sent items with my MSN
sent items (for when I send mail via the website or another
crashes.ifThe
macro seems to work fine as long as the connection remains. However,
the
connection is lost and it shifts to offline mode, the prgoram
.think
Is there a way for VB to check if the target folder is "online"? I
work.that if I run that check before trying to access the folder, it will
Thanks
Rayo
- References:
- Re: VBA access for HTTP folders (MSN/Hotmail)
- From: Michael Bauer [MVP - Outlook]
- Re: VBA access for HTTP folders (MSN/Hotmail)
- From: Michael Bauer [MVP - Outlook]
- Re: VBA access for HTTP folders (MSN/Hotmail)
- From: Rayo K
- Re: VBA access for HTTP folders (MSN/Hotmail)
- From: Michael Bauer [MVP - Outlook]
- Re: VBA access for HTTP folders (MSN/Hotmail)
- From: Rayo K
- Re: VBA access for HTTP folders (MSN/Hotmail)
- Prev by Date: Re: Step Mode Values
- Next by Date: Re: From send importancy?
- Previous by thread: Re: VBA access for HTTP folders (MSN/Hotmail)
- Next by thread: Open current explorer in new window
- Index(es):
Relevant Pages
|
Loading