J
John Kaess
I'm a retired network administrator, my most current exprience being
Exchange 2000 and Outlook 2003. In my prime (20 to 25 years ago) I
could program in assembler, fortran and basic (yes, plain old basic).
Anyway, I'm playing with my outlook signature. I currently have an
external program that inserts (changes) my outlook signature file with
a random quote every 5 minutes. The program home url is:
www.spazmodicfrog.com
Today I found macro code that wil insert my itunes "now playing"
information into the bottom of an outgoing email.
My problem is that when I use this macro to begin a new message, it
starts the message without my signature file (which has my random
quote in it). Is there any way to use this macro code and have it
start a message with my signature file already in it, either before or
after this macro does its thing?
The code is as follows (and it works without any problems):
Sub AddiTunesSig()
' purpose: opens a new mail message,
' appends info re: currently playing track in iTunes
Dim itunes As iTunesApp
Dim strArtist As String
Dim strTitle As String
Dim strOutput As String
Dim mail As Outlook.MailItem
Set itunes = New iTunesApp
'load the track info into easy-to-read variables
strArtist = itunes.CurrentTrack.Artist
strTitle = itunes.CurrentTrack.Name
strAlbum = itunes.CurrentTrack.Album
'assemble the signature
strOutput = vbNewLine & "------------------------------"
strOutput = strOutput & vbNewLine & "Now playing: " & vbCrLf _
& strTitle & vbCrLf & strArtist & vbCrLf & strAlbum
'create a new email message
Set mail = Outlook.CreateItem(olMailItem)
'put the signature in the body
mail.Body = vbNewLine & vbNewLine & strOutput
'show the message to the user
mail.Display
'clear up the memory
Set itunes = Nothing
End Sub
Exchange 2000 and Outlook 2003. In my prime (20 to 25 years ago) I
could program in assembler, fortran and basic (yes, plain old basic).
Anyway, I'm playing with my outlook signature. I currently have an
external program that inserts (changes) my outlook signature file with
a random quote every 5 minutes. The program home url is:
www.spazmodicfrog.com
Today I found macro code that wil insert my itunes "now playing"
information into the bottom of an outgoing email.
My problem is that when I use this macro to begin a new message, it
starts the message without my signature file (which has my random
quote in it). Is there any way to use this macro code and have it
start a message with my signature file already in it, either before or
after this macro does its thing?
The code is as follows (and it works without any problems):
Sub AddiTunesSig()
' purpose: opens a new mail message,
' appends info re: currently playing track in iTunes
Dim itunes As iTunesApp
Dim strArtist As String
Dim strTitle As String
Dim strOutput As String
Dim mail As Outlook.MailItem
Set itunes = New iTunesApp
'load the track info into easy-to-read variables
strArtist = itunes.CurrentTrack.Artist
strTitle = itunes.CurrentTrack.Name
strAlbum = itunes.CurrentTrack.Album
'assemble the signature
strOutput = vbNewLine & "------------------------------"
strOutput = strOutput & vbNewLine & "Now playing: " & vbCrLf _
& strTitle & vbCrLf & strArtist & vbCrLf & strAlbum
'create a new email message
Set mail = Outlook.CreateItem(olMailItem)
'put the signature in the body
mail.Body = vbNewLine & vbNewLine & strOutput
'show the message to the user
mail.Display
'clear up the memory
Set itunes = Nothing
End Sub