Outlook 2007 - Email Question - POP3 to IMAP

Status
Not open for further replies.

Rowdy

Member
Outlook version
Outlook 2007
Email Account
POP3
Hi,

I recently set up aol account with Outlook and by accident set it for POP3 so it deleted all 24000 emails on the server and downloaded to my computer. I tried to change it to IMAP but it doesn't let me, so I created a new IMAP account and have been dragging all the emails to the new account but it keeps freezing up and not transferring all of them. Is there an easier way because now my email on aol is all messed up.

Also - Outlook renamed a lot of emails to have [SPAM]: in the subject line and the emails transferred back to aol now say [SPAM]: and more of those emails are being sent to my spam folder even new incoming ones. I need a VBA macro to remove this string from a couple thousand emails and delete leading spaces. I can't seem to get any macro to work (even after disabling security). Please assist.

Thanks
Rowdy
 

Forum Admin

Senior Member
Outlook didn't add the spam tag - an antispam addin did. (Assuming AOL didn't.) A macro to fix it is here -
http://www.slipstick.com/outlook/email/add-a-file-number-or-keyword-to-the-subject-line-of-messages/

Replace the 3 lines beginning with For each with the following - it runs on all messages in the selected folder - i recommend testing it on a folder with few messages so you are sure its calculating the correct subject length. Create a new folder and copy a few messages to it.



For Each aItem In mail.Items

' use the exact same text, including case
if instr(1, aitem.subject, "[Spam]") > 0 then

' replace 7 with the correct length, including spaces
strTemp = right(aItem.Subject, len(aitem.subject) -7)
aItem.Subject = strTemp

'rest of macro

End if

How many messages are you moving at once? Any sync error messages?

(Updated Sept 27 to fix problem Michael mentioned.)



Sent from my Venue 8 Pro 5830 using Tapatalk
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
if instr(1, aitem.subject, "[Spam]") > 0 then
For Each aItem In mail.Items

Assuming aItem is valid, that is set to an item in the folder, the above checks for "spam" in one item, then replaces the subject for all items no matter whether or not "spam" is contained. If that's not intended, the lines need to be switched.
 

Rowdy

Member
Outlook version
Outlook 2007
Email Account
POP3
Ok, I managed to finish moving all messages to the IMAP account, but now think I messed up the .pst file when I was trying to change the name of the email account because it had a (1) in it so now outlook just freezes everytime I open it. I'm going to try to go into safe mode to rename it back later today but how would I get rid of the bad name?

As for the VBA code to remove spam, I can't get the code to work.

Sub AddFileNumber() Dim myolApp As Outlook.Application Dim aItem As Object
Set myolApp = CreateObject("Outlook.Application") Set mail = myolApp.ActiveExplorer.CurrentFolder
Dim iItemsUpdated As Integer Dim strTemp As String Dim strFilenum As String

strFilenum = InputBox("Enter the file number")
iItemsUpdated = 0
if instr(1, aitem.subject, "[Spam]") > 0 then
For Each aItem In mail.Items
strTemp = right(aItem.Subject, len(aitem.subject) -8)
aItem.Subject = strTemp
aItem.Save Next aItem

MsgBox iItemsUpdated & " of " & mail.Items.Count & " Messages Updated" Set myolApp = Nothing End Sub
 

Rowdy

Member
Outlook version
Outlook 2007
Email Account
POP3
Macro keeps giving me a compile error with every line.
 

Rowdy

Member
Outlook version
Outlook 2007
Email Account
POP3
Now I'm getting Runtime Error 91 with:

If InStr(1, aItem.Subject, "[Spam]:") > 0 Then
 

Rowdy

Member
Outlook version
Outlook 2007
Email Account
POP3
Sub AddFileNumber()

Dim myolApp As Outlook.Application
Dim aItem As Object
Set myolApp = CreateObject("Outlook.Application")
Set mail = myolApp.ActiveExplorer.CurrentFolder
Dim iItemsUpdated As Integer
Dim strTemp As String

iItemsUpdated = 0
If InStr(1, aItem.Subject, "[Spam]:") > 0 Then
For Each aItem In mail.Items
strTemp = Right(aItem.Subject, Len(aItem.Subject) - 8)
aItem.Subject = strTemp
aItem.Save
Next aItem
Set myolApp = Nothing

End If

End Sub
 

Rowdy

Member
Outlook version
Outlook 2007
Email Account
POP3
Upon swapping those lines I get a compile error: Next without For.

Sub AddFileNumber()
Dim myolApp As Outlook.Application
Dim aItem As Object
Set myolApp = CreateObject("Outlook.Application")
Set mail = myolApp.ActiveExplorer.CurrentFolder
Dim iItemsUpdated As Integer
Dim strTemp As String
iItemsUpdated = 0
For Each aItem In mail.Items
If InStr(1, aItem.Subject, "[Spam]:") > 0 Then
strTemp = Right(aItem.Subject, Len(aItem.Subject) - 8)
aItem.Subject = strTemp
aItem.Save
Next aItem '<<<<<<<<---------
Set myolApp = Nothing
End If
End Sub
 

Rowdy

Member
Outlook version
Outlook 2007
Email Account
POP3
I fixed the problem, had part of the if then statement out of the loop. THANKS SO MUCH!
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
S Outlook 2007 printing wrong email address at top of page Using Outlook 8
D Outlook 2007 crashes when opening an email Using Outlook 2
M Outlook 2007 Contacts Glitch: Creating a new email Using Outlook 1
P Outlook 2007 Email Categorization using VBA Outlook VBA and Custom Forms 1
L Outlook 2007 Delete Email Addresses Using Outlook 19
Z Outlook 2007, clicking email addresses fails to open Contact Using Outlook 0
S Send email from excel based on a condition (outlook 2007) Outlook VBA and Custom Forms 1
divan Outlook 2007 - Replace email body with custom text Using Outlook 9
S Can't send messages using Outlook 2007 from a business email Using Outlook 3
L Outlook 2007 Copy Email Address in To Field Using Outlook 11
V Configuring a new IMAP email account in Outlook 2007 Using Outlook 4
S Pre populate subject + body + attachment to already open email in outlook 2007 Using Outlook 2
S unable to send email from my second address (outlook 2007) Using Outlook 2
B Problemss when changing from pop3 to imap email accounts in Outlook 2007 Using Outlook 2
P Changing all email signatures (font, color) at once in outlook 2007 Using Outlook 2
G How to make your IMAP email your default data account in Outlook 2007 Using Outlook 17
B Outlook 2007 - How to set the "send from diff email" as default? Using Outlook 5
M Outlook 2007 cant send email with vista Home Premium Using Outlook 8
L Opening up Contact from an Email - Outlook 2007 Using Outlook 15
A outlook 2007 - there is no email program associated ... Using Outlook 3
L Outlook 2007 Macro to Email Field Using Outlook 31
B Fonts cut off when composing new email on outlook 2007 Using Outlook 1
D Windows 7 / Outlook 2007 - email gets stuck in Outbox Using Outlook 2
I Send Secure Email Through Microsoft Outlook 2007 and 2010 (32 bit) Using Outlook 0
I Send Secure Email Through Microsoft Outlook 2007 and 2010 (32 bit) Using Outlook 0
Z Missing email accounts even though they show in my Outlook 2007 profile Using Outlook 3
R Outlook 2007 - drag drop email to Explorer Using Outlook 1
M Unable to send email to gmail - using Outlook 2007 Using Outlook 3
R Can not send a newsletter to a group. Does not appear Outlook 2007 is recognizing the email addresses. Using Outlook 2
1 I want to get rid of Outlook 2007. When I am in Craigslist & click the email link to contact the per Using Outlook 8
D Outlook 2007 receives and forwards; can't originate an email Using Outlook 2
M Outlook 2007 "cannot open your default email folders.microsoft exchange is not available" on XP is n Using Outlook 1
D Outlook 2007 crashes opening email with image links Using Outlook 4
J Deactivate MS Outlook 2007 prompt to make it the default email client Using Outlook 1
P Outlook 2007 - cannot send email "You do not have the permission to send the message on behalf of th Using Outlook 2
B Wrong account used when "Reply"ing to email - outlook 2007 Using Outlook 6
B Outlook 2007 New email notification works intermittently after adding Exchange 2010 Servers Exchange Server Administration 1
B How to remove underline from email addresses in outlook 2007 and Autotext also missing Using Outlook 2
P MS Outlook 2007 sends email OK. Receives junk mail in junk folder OK. Does not not load received ma Using Outlook 1
W Quickbooks 2011, Windows Vista and Outlook 2007 email issues Using Outlook 2
G I can't open a URL link in from my email- Using Outlook 2007-Vista- AVG anti-virus Using Outlook 1
E How to show both Name and Email address on printout page (Outlook 2007) Using Outlook 1
B Blank email list views on Outlook 2010 / 2007 with Exchange 2010 SP1 (on Citrix and Desktops) Using Outlook 7
B junk email folder properties synchronization tab missing ..outlook 2007 client Using Outlook 3
M I am running outlook 2007 on a hosted exchange server. When I try to send an email and click the To: box there are two contact options - how do I get Using Outlook 1
B junk email folder properties synchronization tab missing outlook 2007 Using Outlook 1
R Microsoft Outlook 2007: Won't Connect to Comcast Email. Using Outlook 4
A Outlook 2007 periodically (1-2 times per day)locks up when trying to send email. I digitally sign all mail. When Outlook became non-responsive Using Outlook 2
M problem when i'm sending email with attachment in outlook 2007...sometimes the other user receive th Exchange Server Administration 2
M problem when i'm sending email with attachment in outlook 2007...sometimes the other user receive th Exchange Server Administration 1
Similar threads


















































Top