Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2014, 01:16 AM
sbkhbk sbkhbk is offline [2007] VBA code replaced my subject with some value, is it posible to get back my sub Windows 7 64bit [2007] VBA code replaced my subject with some value, is it posible to get back my sub Office 2007
Novice
[2007] VBA code replaced my subject with some value, is it posible to get back my sub
 
Join Date: Jun 2014
Posts: 1
sbkhbk is on a distinguished road
Angry [2007] VBA code replaced my subject with some value, is it posible to get back my sub

Hello All,

I was trying to add a default "Subject" for all New mails, but i did a mistake in my code which replaced all the existing mails subject in my Inbox and the same is saved. But my question is, is there any way that i can get back my old subject for all my mails in the inbox?

Here is the piece of my code :

Sub addsubject()
Dim myolapp As Outlook.Application
Dim aitem As Object

Set myolapp = CreateObject("Outlook.Application")
Set mail = myolapp.ActiveExplorer.CurrentFolder

For Each aitem In mail.Items
If InStr(aitem.Subject, "[BCD012]") > 0 Then
aitem.Subject = Left(aitem.Subject, 9)


aitem.Save
End If
Next aitem

End Sub
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[2007] VBA code replaced my subject with some value, is it posible to get back my sub Will uninstalling Microsoft 2007 add 1 back to the 3 I can use? krisc63 Office 2 04-03-2011 11:41 PM
[2007] VBA code replaced my subject with some value, is it posible to get back my sub in 2007, going BACK on a hyperlink Butch Jackman Word 9 02-02-2011 11:29 PM
2007 to mac 2008 and back? diver110 Word 0 08-15-2010 09:44 AM
[2007] VBA code replaced my subject with some value, is it posible to get back my sub 2000 to 2007 can i go back? upthemiddle Outlook 1 07-27-2010 10:25 AM
Custom menu keeps reverting back to old code cookieboy66 Word 0 08-09-2009 03:44 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:42 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft