Ok but not 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
 
J

John Grierson

Hi Dave,

Your macro DateOfLetter works perfectly if you have
inserted a Date Field in the document.

Suspect that RecipientOfLetter will also work if you
insert an AddressBlock

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top