PDA

View Full Version : Opening emails and removing empty lines



Rathgar2
10-25-2010, 04:43 PM
I have a problem with a set of emails in Outlook 2007. Inside a Shared Role Account Inbox we receive tasks via HTML email that must be printed out, entered by hand into a Unix System and then filed away. The trouble is there are unneeded extra spaces inside the email body that cause the email to be printed on 2 pages and we really need to get them to one page. I have mocked up an example:

PROVIDER_NOTIFICATION ***IMPORTANT*** The student listed below has paid for and enrolled in one of the courses offered by your institution through {Blah Blah} University. This student must now be entered in your institution's student information system (SIS). The student should receive the same notification of class meetings, syllabus, materials, URL, passwords, etc. as is necessary for other students enrolled directly through your institution. Thank you for your time and attention to this matter. Student Information Name: {Blah Blah} Email: {Blah Blah} Student ID: {Blah Blah} Mentor: {Blah Blah} Mentor Email: {Blah Blah} Address (In the case of multiple addresses, ship to the street address (#2 address) listed below): {Blah Blah} {Blah Blah} Phone Number: {Blah Blah} Course Information Course Name: {Blah Blah} Course Number: {Blah Blah} Is there a script that will do these actions?:
Open each email.
Remove all of these extra unneeded lines/carriage returns?
Remove the annoying 8 empty spaces that are at the head of each line.
Save the change.
Open the next email in the folder to Wash, Rinse and Repeat I would need to be able to run the script and have it affect all the emails in the shared Role Inbox without needing to open each email and run the Macro.Thanx in advance for your assistance.
WTTW Ken Jaedicke

Rathgar2
11-05-2010, 01:18 PM
Can anyone tell me if this is even possible? Maybe also where to start?

Rathgar2
11-09-2010, 09:39 AM
So this is the solution I came up with. I downloaded AutoHotKey and built this string of keyboard commands to accomplish this task. It is clunky and inelegant but maybe others will find it useful.


^+o::
Send {Enter}{Alt}{Down}{Right 6}
Sleep 1000
Send {Enter}{Down}{Enter}
Sleep 500
Send {Del 3}{Down}{Del 7}{Down}{Del 5}{Down 5}{Del 10}{Down 3}{Del 10}{Down}{Del 10}{Down}{Del 10}{Down}{Del 5}+^{Home}
; Highlight Top Paragraph
Sleep 500
Send {Alt}{Right 3}{Down}{Tab 6}8{Enter}{Home}{Down 14}
; Reduce Top Paragraph Size
Send {End}+^{Up}
; Highlight Student Name
Sleep 500
Send {ALT}{Down}
Sleep 500
Send {Tab 6}16{Enter}
Sleep 500
Send {Home}{Down}{Del 5}{Down}{End}+^{Up}
; Highlight Student Email
Sleep 500
Send {Alt}{Down}
Sleep 500
Send {Tab 6}16{Enter}{Home}{Down}{Del 5}{Down}{End}+^{Up}
; Highlight Student ID
Sleep 500
Send {Alt}{Down}
Sleep 500
Send {Tab 6}16{Enter}{Home}{End}+{Left 4}
; Highlight and Color last 4 digits of Student ID
Sleep 500
Send {Alt}{Down}
Sleep 500
Send {Tab 17}{Enter 2}{Home}{Down}{Del 5}{Down 2}{Del 10}{Down}{Del 10}{Down 2}{Del 10}+^{Up 4}
; Highlights the 4 lines of Mentor Info
Sleep 500
Send {Alt}{Down}
Sleep 500
Send {Tab 6}8{Enter}{Home}{Down 5}{End}+^{Up}
; Highlight Address Line 1
Sleep 500
Send {Alt}{Down}
Sleep 500
Send {Tab 6}16{Enter}
Sleep 500
Send {Home}
return

^+p::
; Clean up remainder of Email and Save, Print and Close and Move down to next in line.
Send {Down}{Del}{Space 8}{End}+^{Up}
; Highlight and fix Address Line 2
Sleep 500
Send {Alt}{Down}
Sleep 500
Send {Tab 6}16{Enter}{Home}{Down}{Del 5}{Down}{End}+^{Up}
; Hightlight Phone Number
Sleep 500
Send {Alt}{Down}
Sleep 500
Send {Tab 6}16{Enter}{Home}
Send {Down 2}{Del 5}{Down}{Del 2}{Space 8}{Down}{Home}{Del 10}{Down}{Del 10}{Down}{Del 10}{Down}{Del 20}{Down}{Del 10}{Down}{Del}{Down}{Del}{Down}{Del 10}{Down}{Del}{Down}
Sleep 500
Send ^s
Sleep 1000
Send ^p
Sleep 500
Send {Enter}
Sleep 1500
Send !{F4}
Sleep 500
Send {Down}
Sleep 500
Send ^+O
return

^+i::
; Clean up Address line 3 and remainder of Email and Save, Print and Close and Move down to next in line.
Send {Down}{Del}{Space 8}{End}+^{Up}
; Highlight Address Line 2
Sleep 500
Send {Alt}{Down}
Sleep 500
Send {Tab 6}16{Enter}{Home}
Sleep 500
Send {Down}{Del}{Space 8}{End}+^{Up}
; Highlight Address Line 3
Sleep 500
Send {Alt}{Down}
Sleep 500
Send {Tab 6}16{Enter}{Home}{Down 3}{End}+^{Up}
; Hightlight Phone Number
Sleep 500
Send {Alt}{Down}
Sleep 500
Send {Tab 6}16{Enter}{Home}
; Clean up remainder of Email and Save, Print and Close and Move down to next in line.
Send {Down 2}{Del 5}{Down}{Del 2}{Space 8}{Down}{Home}{Del 10}{Down}{Del 10}{Down}{Del 10}{Down}{Del 20}{Down}{Del 10}{Down}{Del}{Down}{Del}{Down}{Del 10}{Down}{Del}{Down}
Sleep 500
Send ^s
Sleep 1000
Send ^p
Sleep 750
Send {Enter}
Sleep 1500
Send !{F4}
Sleep 500
Send {ESC}{Down}
Sleep 500
Send ^+o
return