Quick email report question: set caption and use carriage return

Keith Nichols

Registered User.
Local time
Tomorrow, 00:23
Joined
Jan 27, 2006
Messages
431
When using sendobject to email a report, can I send a carriage return in the message somehow? "chr(13)" doesn't work.


The snapshot file attached to the email takes the report caption property to generate the filename "caption.snp".

I have been able to set the caption in the on open property with me.caption = "caption text here", but this event doesn't fire when sending a report to email. I tried setting the caption immediately before calling the report but I get the error 2456 - can't find the report, which is obvious as the report is not open at that stage. Is there an event I can use to set the caption prior to the snapshot file being generated?

In 2002 Cosmos posted a link to a sample database which had solved this problem so I think it can be done. Unfortunately the link is dead.

Any suggestions gratefully recieved. :)
 
I'm not sure if this works with emails, and I'm not really familiar with doing that, but when I want a new line in code I use:
chr(13) & chr(10)
that is carrage return and line feed. I find one it's own doesn't work, and they have to be in the right order.

Hope this is helpful

Sue
 
Sue,

Many thanks - "chr(13) & chr(10)" works fine for the message portion of the sendobject when emailing reports. It may well work for the subject etc, but I haven't tested this. :)

If qanybody out there could shed a little light on why the chr(13) won't do the business on its own, I'd be interested to hear the explanation.

Regards
 
Bump

Anybody know how to set the caption property of a report before it is opened so that when you use the send object method to email, the snapshot file uses the report title for the file name?

Long sentence, hope the answer is shorter :)
 
How to set caption property?

Somebody help me with this....
How to set the caption property of the report before it opens?
I need to send a new report for every order based on InputID.
It helps if each report generates a file with a unique InputID.
Thanks,
Sudhir.
 
chr(13) & chr(10) = vbNewLine

Also
chr(13) & chr(10) = vbCrLf
as well

But for VbNewLine, here's a quote from the help file:
vbNewLine Chr(13) + Chr(10) or, on the Macintosh, Chr(13) Platform-specific new line character; whichever is appropriate for current platform
 

Users who are viewing this thread

Back
Top Bottom