Convert Subject Line to Internet Header version of Subject

Status
Not open for further replies.
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server
Hi.
I attempted a VBA a few weeks ago and messed it up. I changed 500+ emails so that the subject for each one reads "New Subject". How can I correct this using the Internet Header "Subject" that is within the email? I can see it one at a time for copy/paste but, I'd like to do it more efficiently.

Thank you.
 
That worked so well!
It appears that the subject line is listed (in the hidden details) across two lines with a hard return in the middle. Any ideas on how to fix that?
 
Hi Diane...
To clarify, let me show you the pieces of what I'm trying to resolve on this last part.

The Internet Headers lists the Subject as:

Subject: Discovery Information Available For Case 0YG0T4S On Defendant Michael
Gray

Between Michael and Gray is a Hard Carriage Return. As a result, the Subject that you showed me how to retrieve does not return the entire line of data.

How may I tweak the existing script so that this is no longer an issue? Here's the relevant part of your fantastic script!


Code:
Set Reg1 = CreateObject("VBScript.RegExp")
    With Reg1
        .Pattern = "(Subject:\s(.*))"
        .Global = True
    End With
 
You'd use \r at the pattern - i think it's \r, but if it doesn't work, try \n.
.Pattern = "(Subject:\s(.*)\r(.*))"

The only problem is it might pick up part of the next line.
 
BTW - since you only have one subject line in the header, use folder for global. It ill stop checking the header when it finds the first entry.
 
Well. Now I’ve messed up royally! After making the change, I ran the script on my CALENDAR! Any idea how to undo that?! (I’ll be getting out of VBA after this I think)
 
I don't think I've done that before... <g> but will see if there is a second property we can read - there should be something.
 
The subject is in the appointment 3 times... once as a conversation topic. Using that as the propertyAccessor in the oops code should work. I'll test it.
2857
 
:( Conversation index works - but only for meetings.

I changed strheader to strtemp and removed the regex.
Code:
strTemp = propertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x0070001E")
aItem.Subject = strTemp
 
Last edited:
Good morning Diane.

I have to fix one more thing but I'm going to start a fresh thread with it.

thanks!
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
K Need to convert .mmf file to .pst format Outlook VBA and Custom Forms 7
T Why does outlook 2010 convert only some forum notifications to plain text? Using Outlook 0
Z VBA to convert email to task, insert text of email in task notes, and attach copy of original email Outlook VBA and Custom Forms 4
E To convert imported data to custom fields in Task list Outlook VBA and Custom Forms 1
P How do I convert outlook “to-do” items to “tasks” Outlook VBA and Custom Forms 1
I Convert POP3 account (PST) to IMAP (.OST) Using Outlook 3
S problem with convert Using Outlook 1
I Outlook 2016 64bit - on receipt convert emails into PDF and save Outlook VBA and Custom Forms 2
C convert an .ost to .pst Using Outlook 3
D The way to convert ost to pst Using Outlook 2
J Outlook 2013 how to convert 2013 OST file into an another format, i m using outlook 2013 versions. Using Outlook 1
sneaky30 convert text to date Outlook VBA and Custom Forms 1
P Is it possible to convert address book to "Auto-Complete List" (NK2)? Using Outlook 5
Diane Poremsky Convert an Offline File (.ost) to a Personal File (.pst) Using Outlook 0
S How to do I convert OST file to PST? Exchange Server Administration 3
J convert .pst to .eml, how is it possible? Using Outlook 1
M convert/import a customized record into the default "Account" record BCM (Business Contact Manager) 0
V Check/convert to emailaddresses Outlook VBA and Custom Forms 11
R Convert Access table to pst Using Outlook 1
M Outlook 2013 won't convert Excel contacts into Outlook contacts using my custom form Using Outlook 3
L Convert Distribution List of Contacts to Single Contacts Using Outlook 6
G Is there any way to convert outlook 2003 to outlook 2007 Using Outlook 5
D Outlook contacts no in address book - 2002 pst file convert to 2007 pst file? Using Outlook 0
P Outlook 2002 - How to upgrade to 2003 and convert PST from ANSI to Unicode? Using Outlook 7
A Outlook 2003: convert all RTF emails to HTML Outlook VBA and Custom Forms 1
J How to convert BCM contacts to normal Outlook contacts BUT... BCM (Business Contact Manager) 2
G Tasks - convert email to task & attach email Outlook VBA and Custom Forms 6
A Re: Convert Oportunity to Project? BCM (Business Contact Manager) 3
B convert VBA code to Add-in Outlook VBA and Custom Forms 1
Q How tough is it to convert VBA to Addin Outlook VBA and Custom Forms 1
H using VBA to edit subject line Outlook VBA and Custom Forms 0
F Auto changing email subject line in bulk Using Outlook 2
M Outlook Macro to save as Email with a file name format : Date_Timestamp_Sender initial_Email subject Outlook VBA and Custom Forms 0
J Outlook 365 Forward Email Subject to my inbox when new email arrive in shared inbox Using Outlook 0
sjmo2 Change subject for new e-mails only. Outlook VBA and Custom Forms 2
C Outlook 365 Copy/Save Emails in Folder Outside Outlook to Show Date Sender Recipient Subject in Header Using Outlook 0
D Prompt to prefix subject line whenever sending an email Outlook VBA and Custom Forms 3
ill13 Prepend the user's computer name to the subject. Outlook VBA and Custom Forms 1
D Auto Remove [EXTERNAL] from subject - Issue with Macro Using Outlook 21
2 How to get rid of the "Emailing:" prefix in the subject line Using Outlook 1
S Outlook Macro for [Date][Subject] Using Outlook 1
O How to find and replace a word in Outlook-Agenda-Subject and Message? Using Outlook 0
D ISOmacro to extract active mail senders name and email, CC, Subject line, and filename of attachments and import them into premade excel spread sheet Outlook VBA and Custom Forms 2
C Outlook 365 Subject Prefixes? Outlook VBA and Custom Forms 1
A Macro to file emails into subfolder based on subject line Outlook VBA and Custom Forms 1
N Save selected messages VBA does not save replies and/or messages that contain : in subject Outlook VBA and Custom Forms 1
V vBA for searching a cell's contents in Outlook and retrieving the subject line Outlook VBA and Custom Forms 1
C Macro to extract sender name & subject line of incoming emails to single txt file Outlook VBA and Custom Forms 3
diver864 vba for a rule to automatically accept meeting requests with 'vacation' in subject, change to all-day event, change to free, don't send reply Outlook VBA and Custom Forms 1
R Disable conversation thread from replying of recipients in the same subject. Please help Using Outlook 0

Similar threads

Back
Top