Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use resource file with Emails

Status
Not open for further replies.

tg2003

IS-IT--Management
Feb 6, 2003
270
IL
Hi,

I'm currently using the following to use a jpg inside a mail that I send by VB.NET (2008):
Code:
Dim logo As New LinkedResource(My.Application.Info.DirectoryPath & "\myfile.jpg")

I want not to let the users to change this jpg file contents, so I want to use a resource file instead.
I know how I can put this jpg inside my resource file - but how can I point to it? The statement above requests for a string pathname, but I can't supply it when I use
Code:
My.Resources.myfile

Thanks!
 
The only thing I can suggest is save the resource as a file then delete that file once you are finished. To make sure it is a folder they have access to I would use their MyDocuments folder, Use a really strange name, and check first before saving just on the off chance the file already exists. To save the file:
Code:
My.Resources.myfile.Save(PathAndFileName)

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top