virus's imside Aquarius?

Advocate

Re: virus's imside Aquarius?

Subjects are shortened to 50 chars, so that shouldn't be a problem.

 

Luckily the error occurs in a non critical part of the code: writing to a log file

The easiest way to solve it is to just delete that code by deleting the last 8 lines of code EXCEPT the last line. Or to be exact, change the last 9 lines from:

 

Sub WriteToLog(ByRef txt As String)
    Dim fso As Object, stream As Object
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set stream = fso.OpenTextFile(logFile, 8, True) '8=append, True=create if doesn't exist
    stream.WriteLine txt
    stream.Close
    Set stream = Nothing
    Set fso = Nothing
End Sub

 

... to only these 2 lines:

 

Sub WriteToLog(ByRef txt As String)

End Sub

 

Let's hope the rest of the code will work!

If you should run into the error "Outlook cannot do this action on this type of attachment", the solution is here

Advocate

Re: virus's imside Aquarius?

Actually a quicker fix and let's you keep the log file too, is to change the line that caused the error from:

 

stream.WriteLine txt

 

to:

 

stream.WriteLine GetSimpleName(txt)

 

If that doesn't help the try my first suggestion.

I think the error seems to be caused by "unusual" characters that couldn't be written to the log file (a text file).

Scholar

Re: virus's inside Aquarius?

Hi, this is great, thank you!

 

1) with the script modification provided 4-1-14 (page 5 of this topic), is there a way to not have a pop-up window to check through?

2)  Halfway through processing a compacted 5G PST file the script threw this error:  "Run-time error '-2147352567 (80020009)': Array index out of bounds"   Any ideas?

 

 Script highlight line: 

>If UCase(TypeName(inFolder.Items.Item(no))) = "MAILITEM" Then

 

Thanks!

Advocate

Re: virus's inside Aquarius?

1) You could comment out the line of code that does the pop-up by adding a ' character at the beginning of that line. Or simply delete that line of code:

MsgBox filename, vbExclamation

 

2) Out of bounds mean an item doesn't exist. Don't know what could be causing it but I'd check the log file to see what folder/email/attachment were processed when it happened, and then try to open these manually to see if it's perhaps corrupt.

Everytime a new folder is processed it logs Processing: foldername (X items) and that error indicates somehow that the X number of items isn't correct which is weird. Maybe with that much data something might be corrupt.

You could try to run the macro for one folder at a time instead of all folders at once to get it running more than halfway, and to find out what folder or item is causing the error.

Scholar

Re: virus's inside Aquarius?

Thank you!  Modified the code, checked the log file and removed the offending file (not sure why?), re-ran on the same PST and extracted all attachments (about 7,000) without further hitch.