Problem sending Report as EMail - wrong attach. name "untitled.txt"

  • Thread starter Thread starter Matthias Haberkorn
  • Start date Start date
M

Matthias Haberkorn

Hello,

I haved used VS2003 and send some Reports as EMail attachmend with vb.net.
The code looks like this:

Dim pdfOpts As PdfRtfWordFormatOptions = _
ExportOptions.CreatePdfRtfWordFormatOptions()
Dim MailOptions As MicrosoftMailDestinationOptions = _
ExportOptions.CreateMicrosoftMailDestinationOptions()
Dim exportOpts As ExportOptions = New ExportOptions
pdfOpts.UsePageRange = False
exportOpts.ExportFormatOptions = pdfOpts

With MailOptions
.MailToList = Vorgang_INFO.Druck_EMail_Adresse
.MailMessage = Vorgang_INFO.Druck_EMail_Body
.MailSubject = Vorgang_INFO.Druck_EMail_Betreff
End With

exportOpts.ExportDestinationOptions = MailOptions
exportOpts.ExportDestinationType = ExportDestinationType.MicrosoftMail
exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat

rep.Export(exportOpts)

Now, I am using VS2005 and the attached File in the generated Mail in named
"untitled.txt" - but it should be "Export.pdf" what happens here from VS2003
to VS2005? Heeeeeeeeeeelp!!!!! :o)

Greeting Matthias
 
Hi Matthias,

Did you get around this? I'm having the same problem with the application
I've converted to VS2005.

Regards

Bojan
 
Hi Bojan,

I did this: Make a little Sub -> export the Report as PDF to FileSystem ->
Make a new mail -> Attach the PDF. Works fine :o)

Greetings Matthias
 
Thanks,

I'll do the same. It amazes me that there are no more posts on this.

Regards

Bojan
 
Yes ;o) But now we have good Sub's ;o)

Bojan Kuhar said:
Thanks,

I'll do the same. It amazes me that there are no more posts on this.

Regards

Bojan
 
Hi Matthias,

I've hit the wall. Maybe you can help me.

It is easy to send mail via SMTP using System.Net webspace but I need to use
MAPI because sent mail has to appear in the Outlook "Sent Items" folder.

Regards

Bojan
 
Hm, I don't use MAPI because the securety-message from Outlook is really
f....... I use SMTP to, but it would be usefull to use MAPI and/or SMTP... I
can send you an small sub/function in 1 day ...

greetings matthias
 
Back
Top