|
I see thank you.
Having read through it makes perfect sense now.
I just didn't want to appear foolish, so thought better to ask first than ask after!
------------------------------------
"The greatest tragedy in mankind's entire history may be the hijacking of morality by religion"
Arthur C Clarke
|
|
|
|
|
No problem
|
|
|
|
|
Hi Arthur,
I think what Tom suggested is right , you may use a smpt Client to send a mail you can attach you excel file to the mail , just create a small exe file , which send the mail , your manager can click on the exe and the mail is sent , following is the code from one of my application , this code was used to send the mail , i hope this may help you .
it use an smtp server,please enter proper email id as marked in the comments , i have tested it from a gmail account
Dim smtpClient As New Net.Mail.SmtpClient()
Dim mail As New Net.Mail.MailMessage()
'create the message to be sent
mail.To.Add("test@test.com") ' Enter the Email of the person you want to send the mail to
mail.From = New Net.Mail.MailAddress("username@gmail.com", "Your Display Name") ' Enter Your email address
mail.Subject = "Test Message"
mail.Body = "This is a test message"
' Prepare the client to send the above message
'Attach the file as attachment
mail.Attachments.Add(new System.Net.Mail.Attachment("yourFileName.xls"))
smtpClient.Host = "smtp.gmail.com"
smtpClient.EnableSsl = True
smtpClient.Port = 587
smtpClient.Credentials = New Net.NetworkCredential("username@gmail.com", "password") 'Enter username and password of the account , you want to use to send mail
smtpClient.DeliveryMethod = Net.Mail.SmtpDeliveryMethod.Network
smtpClient.Send(mail)
Hope this help
|
|
|
|
|
Hi I am currently working on a app that prints a html invoice using Internet Explorer. as follows
Dim internetExplorer As New SHDocVw.InternetExplorerClass()
Dim webBrowser As SHDocVw.IWebBrowser2 = CType(internetExplorer, SHDocVw.IWebBrowser2)
'// Make the web browser visible. //
webBrowser.Visible = False
'
Dim noValue As Object = System.Reflection.Missing.Value
webBrowser.Navigate("file://" + fileName, noValue, noValue, noValue, noValue)
Threading.Thread.Sleep(1000)
'// Get access to the webbrowser's document.
Dim htmlDoc As mshtml.IHTMLDocument2 = internetExplorer.Document
Dim o As Object = ""
htmlDoc.execCommand("Print", False, o)
htmlDoc.close()
I read in the documentation that one can set a value for nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER for the dialog. I just can't seem to figure out where to set it. All help greatly appreaciated. Tx
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
Stephen Lintott wrote: webBrowser.Navigate("file://" + fileName, noValue, noValue, noValue, noValue) Threading.Thread.Sleep(1000)
The Thread.Sleep line is of no use. It's making the improper assumption that the page takes, at MOST, 1 second to load. It's better to check the Busy property every so often to know when the browser is ready.
You can't use that trick with the .NET version of the WebBrowser control. You have to use the COM server that IE exposes directly to do that. A sample of which can be found here[^]. The code is in C#, but is easily converted to VB.NET using any online code conversion utility or, even better, done by hand.
|
|
|
|
|
Thats all fine and good but it doesn't answer the original question. Any help with that?
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
Thanks for down-voting me, and YES, it DOES answer the original question. You cannot use the .NET WebBrowser control to do what you want. You have to use the unwrapped COM server IE exposes, THEN you can use the technique you described. I even posted a link to a code example showing you exactly how to do it.
So, how did that not answer the original post?
|
|
|
|
|
Thanks.
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
Thanks for all the help. I tryed it and it worked. Sorry for the vote. I misread your answer and acted on that. If I could take it back I would
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
hi all,
how can i move a directory (also sub directory and files) from one volume to other volume ?
Directory.Move function fails when source and target drive are different.
Please suggest
|
|
|
|
|
Dear
as much as i know you have to do complete task in two parts,
first copy all the subfoloder and files in new drive location ie. from c drive's source folder to d drive's destination folder and
second delete the folder exist in c driver ie, source folder
|
|
|
|
|
hi sumit,
sumit prakash sharma wrote: first copy all the subfoloder and files in new drive location
how can i copy folder from one drive to second
|
|
|
|
|
it's too easy and short code
now i m going to give complete code for coping and deleting
My.Computer.FileSystem.CopyDirectory("C:\SourceDirectory", "D:\DestinationDirectory")
My.Computer.FileSystem.DeleteDirectory("C:\SourceDirectory", FileIO.DeleteDirectoryOption.DeleteAllContents)
if above code is usefull then plz reply
|
|
|
|
|
it's too easy and short code
now i m going to give complete code for coping and deleting
My.Computer.FileSystem.CopyDirectory("C:\SourceDirectory", "D:\DestinationDirectory")
My.Computer.FileSystem.DeleteDirectory("C:\SourceDirectory", FileIO.DeleteDirectoryOption.DeleteAllContents)
if above code is usefull then plz reply
|
|
|
|
|
Thanks a lot sumit
5 from me
|
|
|
|
|
|
i completed one project in vb.net with msacess database.... the problem is when i came to publish the project i clicked publish from menu ........ the problem is i can't add my msacess database setup.exe file.... thats why i can't publish my project .... i need answer for my query....
|
|
|
|
|
|
I have a big file in witch i wanted to find a hex value. The hex value contains several values, for example D274D274. Can anyone help me
|
|
|
|
|
So what have you written?? This is easy enough to do. Just read the file byte-by-byte until you find the first byte in the value you're looking for. Then compare the next byte in the file to the next byte in the value. If they match, do it again on the next byte. If not, keep looking for the first byte in the value until you find it again.
|
|
|
|
|
I would like to know how to detect a video card in a splash screen and then write the values to the registry. After closing the main form and rebooting it, all the splash screen has to do then is check the registry settings and exit and display the main form.
rspercy
1 + 1 = 186,440....Depending on the species.
|
|
|
|
|
Why would you want to check the video card?? You can't get at it directly, or the closest you're going to get with that is through DirectX. What are you checking for??
|
|
|
|
|
All I want to know if it is ATI, NVidia, or some other brand. I do not want to access the card itself. THNX for such a quick response.
rspercy
1 + 1 = 186,440....Depending on the species.
|
|
|
|
|
You can use the System.Management namespace and it's classes to get all instances of the Win32_VideoController WMI class. This will give you the manufacturer and model of all the video controllers in the system. Careful, you may be surprised at what you find.
|
|
|
|
|
WOW, a lot of stuff. Anyway, Thats what I was looking for. THNX a lot for your expertise on this subject.
rspercy
1 + 1 = 186,440....Depending on the species.
|
|
|
|