access links
December 10th, 2008http://www.candace-tripp.com/utterangel.aspx
http://www.candace-tripp.com/utterangel.aspx
The following macros are great workarounds for mailing list software. I did not create these theres a link to the guys site at the bottom and also a download link on his page. Ive just put them here because i use them and theyre great.
Script 1 - GetEmailSender:
Extracts email sender. Runs on all mailitems in current folder that are unread. This is the Macro I run on Unsubscribe emails.
Script 2 - GetEmailFromBody:
Extracts first found email address from body. Runs on all items in current folder. This is the Macro I run on Delivery Failure emails.
Sub GetEmailSender()
' ------------------------------------------------
' --- You may use and/or change this code freely
' --- provided you keep this message
' ---
' --- Description:
' --- Extracts email sender
' --- Runs on all mailitems in current folder that
' --- are unread
' ---
' --- By Max Flodén 2006 - http://www.tjitjing.com
' ------------------------------------------------
Dim myOlApp As New Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim mySelection As Selection
Dim myItem As Object
Dim myMailItemLog As Outlook.MailItem
Dim myFolder As Outlook.MAPIFolder
Dim strContactFolderName As String 'Directly under Public Folders\All Public Folders
Dim strNewsletterCategoryName As String
Dim strMailItemSender As String
Dim strMailTo As String
Dim intMessageCount As Integer
Dim bolDebug As Boolean 'If true error messages will be shown
Dim strTemp As String
Set myNameSpace = myOlApp.GetNamespace("MAPI")
'Debug settings
bolDebug = True
'Ask to continue - start warning
intRes = MsgBox("This macro will go thru all items in folder." & vbCrLf & "Would like to continue?", vbYesNo + vbQuestion, "Get Email Sender")
If Not intRes = vbYes Then Exit Sub
'Create a new email to use as log file
Set myMailItemLog = myOlApp.CreateItem(olMailItem)
myMailItemLog.Recipients.Add (myNameSpace.CurrentUser)
myMailItemLog.Subject = "Email from Body - " & Now()
myMailItemLog.BodyFormat = olFormatPlain
myMailItemLog.Body = Now() & " Starting..." & vbCrLf & vbCrLf
'Go thru all items in folder
intMessageCount = 0
intMsgCount_Error = 0
For Each myItem In myOlApp.ActiveExplorer.CurrentFolder.Items
If Not TypeName(myItem) = "MailItem" Then
'Errorlog
If bolDebug Then myMailItemLog.Body = myMailItemLog.Body & "ERROR - MESSAGE TYPE IS NOT MAILITEM." & vbCrLf
myItem.UnRead = True
intMsgCount_Error = intMsgCount_Error + 1
ElseIf myItem.UnRead Then
myMailItemLog.Body = myMailItemLog.Body & myItem.SenderEmailAddress & vbCrLf
myItem.UnRead = False
myItem.FlagStatus = olFlagMarked
intMessageCount = intMessageCount + 1
End If
Next
'Done - write to log and show done message
myMailItemLog.Body = myMailItemLog.Body & vbCrLf & Now() & " Done. Email addresses extracted: " & intMessageCount & ". Email addresses NOT extracted: " & intMsgCount_Error & "."
myMailItemLog.Display
MsgBox Now() & " Done. Email addresses extracted: " & intMessageCount & ". Email addresses NOT extracted: " & intMsgCount_Error & ".", vbInformation, "Done"
End Sub
Sub GetEmailFromBody()
' ------------------------------------------------
' --- You may use and/or change this code freely
' --- provided you keep this message
' ---
' --- Description:
' --- Extracts first found email address from body
' --- (used to extract email address from
' --- error messages/returned email)
' --- Runs on all items in current folder
' ---
' --- By Max Flodén 2006 - http://www.tjitjing.com
' ------------------------------------------------
Dim myOlApp As New Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim mySelection As Selection
Dim myItem As Object
Dim myMailItemLog As Outlook.MailItem
Dim myFolder As Outlook.MAPIFolder
Dim strContactFolderName As String 'Directly under Public Folders\All Public Folders
Dim strNewsletterCategoryName As String
Dim strMailItemSender As String
Dim strMailTo As String
Dim intMessageCount As Integer
Dim bolDebug As Boolean 'If true no emails will be sent
Dim bolOnly550 As Boolean 'Only extract email addresses that are 'user not found' (#550) etc.
Dim strTemp As String
Set myNameSpace = myOlApp.GetNamespace("MAPI")
'Debug settings
bolDebug = True
'Ask to continue - start warning
intRes = MsgBox("This macro will go thru all items in folder." & vbCrLf & "Would like to extract only addresses that have 'user not found'?", vbYesNoCancel + vbQuestion, "Get Email from Body")
If intRes = vbCancel Then
Exit Sub
ElseIf intRes = vbYes Then
bolOnly550 = True
Else
bolOnly550 = False
End If
'Create a new email to use as log file
Set myMailItemLog = myOlApp.CreateItem(olMailItem)
myMailItemLog.Recipients.Add (myNameSpace.CurrentUser)
myMailItemLog.Subject = "Email from Body - " & Now()
myMailItemLog.BodyFormat = olFormatPlain
myMailItemLog.Body = Now() & " Starting..." & vbCrLf & vbCrLf
'Go thru all items in folder
intMessageCount = 0
intMsgCount_Error = 0
For Each myItem In myOlApp.ActiveExplorer.CurrentFolder.Items
If Not TypeName(myItem) = "ReportItem" And Not TypeName(myItem) = "MailItem" Then
'Errorlog
If bolDebug Then myMailItemLog.Body = myMailItemLog.Body & "ERROR - MESSAGE TYPE IS NOT REPORTITEM OR MAILITEM." & vbCrLf
myItem.UnRead = True
intMsgCount_Error = intMsgCount_Error + 1
Else
'Check type is 550 - user not found/inactive etc
If bolOnly550 And _
(InStr(myItem.Body, "550") = 0) And _
(InStr(myItem.Body, "554") = 0) And _
(InStr(myItem.Body, "unknown user") = 0) And _
(InStr(myItem.Body, "user unknown") = 0) And _
(InStr(myItem.Body, "no mailbox here by that name") = 0) And _
(InStr(myItem.Body, "no such user") = 0) And _
(InStr(myItem.Body, "bad address") = 0) And _
(InStr(myItem.Body, "Host or domain name not found") = 0) And _
(InStr(myItem.Body, "e-mail account does not exist") = 0) Then
If bolDebug Then myMailItemLog.Body = myMailItemLog.Body & "ERROR - NOT 550 OR Host or domain name not found MESSAGE." & vbCrLf
myItem.UnRead = True
intMsgCount_Error = intMsgCount_Error + 1
Else
'Extract email address from body
intPos = InStr(myItem.Body, "@")
If intPos = 0 Then
'No email address found
If bolDebug Then myMailItemLog.Body = myMailItemLog.Body & "ERROR - NO EMAIL ADDRESS FOUND IN MESSAGE." & vbCrLf
myItem.UnRead = True
intMsgCount_Error = intMsgCount_Error + 1
Else
'Get right of @
intPos_Space = InStr(intPos, myItem.Body, " ")
intPos_Bracket = InStr(intPos, myItem.Body, ">")
If (intPos_Space < intpos_bracket =" 0)" intpos_temp =" intPos_Space" intpos_temp =" intPos_Bracket" strtemp =" Left(myItem.Body," intpos_space =" InStrRev(strTemp," intpos_bracket =" InStrRev(strTemp,"> intPos_Bracket) Or (intPos_Bracket = 0) Then
intPos_Temp = intPos_Space
Else
intPos_Temp = intPos_Bracket
End If
strTemp = Mid(strTemp, intPos_Temp + 1)
‘Write to log
myMailItemLog.Body = myMailItemLog.Body & strTemp & vbCrLf
myItem.UnRead = False
intMessageCount = intMessageCount + 1
End If
End If
End If
Next
‘Done - write to log and show done message
myMailItemLog.Body = myMailItemLog.Body & vbCrLf & Now() & ” Done. Email addresses extracted: ” & intMessageCount & “. Email addresses NOT extracted: ” & intMsgCount_Error & “.”
myMailItemLog.Display
MsgBox Now() & ” Done. Email addresses extracted: ” & intMessageCount & “. Email addresses NOT extracted: ” & intMsgCount_Error & “.”, vbInformation, “Done”
End Sub
The other week i had what can only be described as a panic attack. I woke up walked across the room and everything went icy cold. The room started to spin slowly like the start of a ride at the fair ground. I made it to the phone and called an ambulance as i felt my heart start to race. I figured this was it as i spoke to the person on the other end of the phone. They asked me to count my heart beat and after figuring out it was over 170 i wasnt feeling great. By now i was laid on my bed and the world started blacking out. A thousand thoughts rush through your head when you go through something like this, i wont go into detail its just the basics echoed with a loud “IS THIS IT”. 5 mins later i started to regain my sight and went downstairs. the ambulance was outside and they took me to hospital. My heart started racing again as i was sat in the ambulance. Once again the thoughts came, will i see ANYONE again. Its obvious i did or i wouldnt be writing this now but at the time i was shitting myself. Anyway i arrived at the hospital and they checked me over and kept me there till my heart went back to normal. For the next 2 weeks i was walking around thinking i was going to die. Its hard to explain but i could not convince myself i was going to be alright. especially as i kept getting heart palpitations and thoughts that i was going crazy. I went in for some blood tests but everything came back normal. 2 weeks after this i figured i was on the mend. I still had no clues as to what happened to me. to be honest i was past caring i just wanted the norm back. So i woke up again on a saturday morning and i felt the anxiety stream into my body. i knew it was happening again. this time i lost part of my eye sight. by this i mean my eyes just didnt work anymore. I was seeing double vision and could not read to save my life. Thats my job out the window i thought. imagine spending all your life using computers its your whole world and now you face not even being able to use them. Its pretty daunting i tell you that. Anyway im cutting the story short and just letting you know that im here now 2 months after all this happened. Im getting better now i know it the only thing hanging over me is the MRi ive got on friday. You see I talked them into giving me an MRI after my vision went down the pan. Now they’ve found something… and im sh1t scared about what it is. Im sorry for the profanity but nothing else really describes what im feeling. The thoughts going through my head right now are intense. On top of it all im on a break with my girlfriend who ive been with for almost 3 years. sad eh….. look its another person thats looking for a bridge or a rope. Well thats not the case for me. Im reclaiming my life, i dont care whats wrong with me im going to beat it. My girlfriend has caused me too much pain over the past 3 years so thats not a loss in my eyes. Ive just insured my car and its getting Mot’d tomorow so ill be back driving again by the weekend. Thats where i need to be…. driving with my music on, theres nothing like it. Ive got plans now and my plans are to LIVE.
Someone famouse once wrote something i get told alot. “money isnt everything”
In my eyes someone didnt stay around to hear the ending “money isnt everything Time is” im not wasting any more!!!!!
To import an Excel file into MySQL, first export it as a CSV file. Remove the CSV headers from the generated CSV file along with empty data that Excel may have put at the end of the CSV file.
You can then import it into a MySQL table by running:
load data local infile 'uniq.csv' into table tblUniq
fields terminated by ','
enclosed by '"'
lines terminated by '\n'
(uniqName, uniqCity, uniqComments)
The fields here are the actual tblUniq table fields that the data needs to sit in. The enclosed by and lines terminated by are optional and can help if you have columns enclosed with double-quotes such as Excel exports, etc.[/code]
Welcome to Tigerdisk. I figured its about time i got some kind of portfolio up. Also a place to collect the thousands of links i seem to bookmark. You see im one of those people that trawls google searching for something in particular but then i notice a link that i wouldnt mind checking later. Well after a few months of adding the links and never getting time to go back and view them, i decide to do a format. Being a reasonably smart fellow i then stock pile them in a folder i call old. After over 13 years on the net you can imagine how big my folder has gotten. Also trying to find a specific link in that mess is just impossible. So im what better way to organise web links than a wp install with a dedicated section. This i think is the first site ive actually made that ive literally got content flying out of my ears for.
Ok well thats not much of an introduction but im sure ill get round to posting a bio on me later tata for now.