View Single Post
 
Old 11-01-2011, 03:15 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Paulsh,

Have you considered using autotext function? Alternatively, you could store both the initials and names in a single macro:
Code:
Sub AddSender()
Dim StrNames As Variant, StrInits As Variant, StrSender As String, i As Long
StrSender = InputBox("Enter Sender's Initials:", "SENDER")
If StrSender = "" Then Exit Sub
StrInits = Array("mc", "yz", "ar")
StrNames = Array("Michael Carlton", "Yasmin Zanders", "Andy Ryan")
For i = 0 To UBound(StrInits)
  If StrInits(i) = StrSender Then
    Selection.InsertAfter StrNames(i)
    Exit For
  End If
Next
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote