Hi,
I have created a macro which takes the data in an access data base and produces a letter based on the information. I am almost at the end but have found a variable that I don't seem to be able to find an answer for. The issue in questions relates to a field called first name. It's not always the case that we would know the full first name and on occasions we just enter the initial of the first name. This means that the letter becomes "Dear R". I have tried several different If else statement in the hope that if first name = 1 then "dear sir", else if first name = 2 then the full name appears (sorry if this is a bit vague)! I seem to be getting nowhere fast:banghead:!
Thanks for any help.
Dan.
I have created a macro which takes the data in an access data base and produces a letter based on the information. I am almost at the end but have found a variable that I don't seem to be able to find an answer for. The issue in questions relates to a field called first name. It's not always the case that we would know the full first name and on occasions we just enter the initial of the first name. This means that the letter becomes "Dear R". I have tried several different If else statement in the hope that if first name = 1 then "dear sir", else if first name = 2 then the full name appears (sorry if this is a bit vague)! I seem to be getting nowhere fast:banghead:!
Code:
f [First Name] = 1 Then
WrdApp.Selection.TypeText Text:="Sir/Madam"
ElseIf [First Name] = 2 Then
WrdApp.Selection.TypeText Text:=StrConv([First Name], vbProperCase)
End If
Thanks for any help.
Dan.