email attachements in vb .net

  • Thread starter Thread starter Bernie Yaeger
  • Start date Start date
B

Bernie Yaeger

I know how to attach a document to an email inside vb .net with
msg.attachments.add("c:\ppp.txt")

However, is there a way to attach files via wildcards - eg, c:\p*.txt to get
c:\ppp.txt and c:\ppw.txt? I tried it directly but got an unrecognized cast
error.

Thanks for any help.

Bernie Yaeger
 
figured out a way - just looping with dirinfo and attaching only those that
meet the spec.

Tx

Bernie
 
* "Bernie Yaeger said:
I know how to attach a document to an email inside vb .net with
msg.attachments.add("c:\ppp.txt")

However, is there a way to attach files via wildcards - eg, c:\p*.txt to get
c:\ppp.txt and c:\ppw.txt? I tried it directly but got an unrecognized cast
error.

\\\
For Each s As String In Directory.GetFiles("C:\p*.txt")
...
Next s
///
 
Back
Top