PC Review


Reply
Thread Tools Rate Thread

Run-time error '-2147467259 (80004005)'

 
 
Lynn
Guest
Posts: n/a
 
      4th Feb 2005

hi,
i have got a pop-up error message "Run-time error '-2147467259
(80004005)'
The operation failed. when i run this macro in outlook. pls help.
thanks

Sub SaveItems()


Dim objItem As Object
Dim objSelection As Selection
Dim strPath As String
Dim strFile As String
Dim intCounter As Integer


'Retrieve a reference to the selected items in the active folder
Set objSelection = Application.ActiveExplorer.Selection


If objSelection.Count = 0 Then
MsgBox "You must select at least one item to save first.",
vbCritical,
"No Items Selected"
Else
'Initialize variables
strPath = "c:"
intCounter = 0
'Cycle through all items in the selection
For Each objItem In objSelection
'Increment the counter
intCounter = intCounter + 1
'Create the filename
strFile = strPath & Format$(intCounter, "000") & " - " &
objItem.Subject & ".msg"
'Save the item
objItem.SaveAs strFile, olMSG
Next


Set objItem = Nothing


MsgBox intCounter & " items were saved to " & strPath


End If


Set objSelection = Nothing


End Sub

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error! Error! IE Error! Helpless Windows XP Internet Explorer 1 7th Mar 2004 04:52 PM
Error message NSAPI Internal Error Error Code = 100 Kevin @ kwinters54@yahoo.com Windows XP Internet Explorer 0 5th Feb 2004 10:59 PM
Error, Error, Error. JohnMc Windows XP Basics 0 22nd Dec 2003 12:22 AM
A runtime error has occured. Do you want to debug? Line: 1 Error: syntax error Eric Windows XP Networking 0 24th Nov 2003 04:45 PM
IE 6 RunTime error / Line: 335 / Error: Unspecified Error kwloch Windows XP Internet Explorer 0 27th Sep 2003 02:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:32 AM.