Two codes that don't work but are 'ok'

D

Dave Neve

Hi

Both the following codes produce a
MsgBox with the word 'ok' but I was expecting a date and an adress.

What is wrong please?

Sub DateOfLetter()
MsgBox ActiveDocument.GetLetterContent.DateFormat
End Sub

Sub RecipientOfLetter()
Dim MyLetterContent
Set MyLetterContent = ActiveDocument.GetLetterContent
MsgBox MyLetterContent.RecipientName
End Sub
 
Top