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

  • Thread starter Matthias Haberkorn
  • 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!!!!! :blush:)

Greeting Matthias
 
G

Guest

Hi Matthias,

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

Regards

Bojan
 
M

Matthias Haberkorn

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 :blush:)

Greetings Matthias
 
G

Guest

Thanks,

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

Regards

Bojan
 
M

Matthias Haberkorn

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
 
G

Guest

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
 
M

Matthias Haberkorn

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
 
M

Matthias Haberkorn

If you have an already finished code, let me know ;o)

Greetings Matthias
 

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

Similar Threads


Top