36
General Software Discussion / Re: Can't copy actual email addresses from Outlook.
« on: October 20, 2009, 12:52 AM »...I'm trying to copy a bunch of email addresses to use in another program. All the recipients are already on one of my Outlook emails. .... there's no email address shown, only the name (since Outlook will process it later). For the outsiders that are not in an addressbook, the full email is shown. Now, I'm trying to copy all the email addresses to another program, so the name does me no good. I need the actual flippin' email address. Is there anyway to copy it easily using ctrl-c? NO!! I hate this shitty program.-superboyac (October 06, 2009, 11:14 AM)
I had the exact same problem, being a tinkerer i wrote a simple macro/vb to get that functionality. see below
/EDIT: I realized i've done this only for a distribution list.... i.e. when i wanted to export the distribution list to another program....etc. It could be modified with some research to work with the active email.
Code: Visual Basic [Select]
- Sub CopyCSVEmail()
- 'This puts a comma seperated email list for a distribution list on the clipboard
- Dim myDistList As DistListItem
- Dim j As Integer
- Dim iOutFormat As Integer
- Dim iPos As Integer
- Dim sOutput As String
- 'Check type of object in current view
- If TypeName(Application.ActiveInspector.CurrentItem) <> "DistListItem" Then Exit Sub
- 'Assign it to a typed variable
- Set myDistList = Application.ActiveInspector.CurrentItem
- iOutFormat = 1
- sOutput = InputBox("Please Choose a MODE: " & vbCrLf _
- & "1 = Address,.." & vbCrLf _
- & "2 = Name (Address),.." & vbCrLf _
- & "3 = Name <Address>,..", "Mode", "1")
- On Error Resume Next
- iOutFormat = CInt(sOutput)
- On Error GoTo 0
- ' If (MsgBox("Do you want the addersses with names?", vbQuestion + vbYesNo, "With names?") = vbYes) Then
- ' iOutFormat = 2
- ' End If
- 'do what you want
- sOutput = ""
- For j = 1 To myDistList.MemberCount
- If iOutFormat = 1 Then
- sOutput = sOutput & myDistList.GetMember(j).Address & ", "
- ElseIf iOutFormat = 2 Then
- sOutput = sOutput & myDistList.GetMember(j).Name & ", " '" <" & myDistList.GetMember(j).Address & ">, "
- ElseIf iOutFormat = 3 Then
- iPos = InStr(1, myDistList.GetMember(j).Name, "(") - 1
- If iPos < 0 Then iPos = Len(myDistList.GetMember(j).Name)
- sOutput = sOutput & Trim(Left(myDistList.GetMember(j).Name, iPos)) & " <" & myDistList.GetMember(j).Address & ">, "
- Else
- sOutput = "Error: Incorrect Mode specified"
- End If
- Next j
- sOutput = Left(sOutput, Len(sOutput) - 2) 'Trim last two characters
- 'MsgBox sOutput
- InputBox "Copy (Press Ctrl+C) the following line to wherever you want.", "Email Address(es)", sOutput
- 'PutOnClipboard (sOutput)
- 'reset vars
- Set myDistList = Nothing
- End Sub
Google how to add macros in outlook to see where you can paste this.