E-mail file name

If you are a VFP developer and have any questions about using our products from VFP here is the place to post them.
Post Reply
hank
Posts: 1
Joined: Thu May 15 2003

E-mail file name

Post by hank » Thu May 15 2003

The following section of code works ok for sending an e-mail directly, but does not respect the DefaultFileName. In VFP5, the attachment is always called Visual Foxpro.PDf. In vpf7, it takes the name of the FRX(xxx). I need to have control of the document name (i.e. Your Statement.PDF)

Any ideas on how to do this?

I think there is probably a way to change the windows DOCINFO structure so that the attachment name can be manipulated, by using the StartDocPost hook, but I can't figure out how to get a pointer to it. Has anybody done it this way (or any other)?

.....
.DefaultFileName = "C:\mytest.pdf"
.FileNameOptionsEx = 1 + 2
.FileNameOptionsEx = .FileNameOptionsEx + 0x800
.EmailFieldTo = pc_emailaddr
.EmailMessage = 'Please find attached your monthly statement as a PDF document.'
.EmailSubject = 'OCC ' + pc_stmtdate + ' Statement'
REPORT FORM xxx TO PRINT NOCON
...

Post Reply