![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Copy & paste from IE/FF into a new Outlook email via VBScript Hi there I need to write a script which refreshes a browser window/tab (IE or FF in our case), copies the content into a new email in Outlook and sends it off to a set address. We're using a software to manage our job sheets for billing purposes. The software exports the job sheets as a HTML file. This file is then manually opened in a browser, the content copied into a new email and sent off to the finance department for billing (yes I know it isn't the most elegant way but that's how it is). This can be a rather tedious job and it would be much easier to simply create a new job sheet, fire up a script in Outlook to automatically refresh the browser window/tab, copy the content across into a new email and send it off. Simply opening the HTML file won't cut it since it only shows the HTML code in the email, making it virtually unreadable. Of course if anybody can tell me how to get Outlook to render the code rather than display it, things would be much neater and more efficient. The part I am stuck on atm is the "refreshing the browser window" and "copy to the clipboard". Sorry for my ignorance but I'm not very familiar with Windows scripting and have been "thrown into cold water" here. I've spent the last few days searching the web left, right and centre for ideas but couldn't find anything useful so far. Any ideas how I can get this done? Cheers Tom |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Copy & paste from IE/FF into a new Outlook email via VBScript <damista@xxxxxx> wrote in message news:0b646b2f-f564-4362-8821-85a58c78d4b0@xxxxxx Quote: > Hi there > > I need to write a script which refreshes a browser window/tab (IE or > FF in our case), copies the content into a new email in Outlook and > sends it off to a set address. > > We're using a software to manage our job sheets for billing purposes. > The software exports the job sheets as a HTML file. This file is then > manually opened in a browser, the content copied into a new email and > sent off to the finance department for billing (yes I know it isn't > the most elegant way but that's how it is). This can be a rather > tedious job and it would be much easier to simply create a new job > sheet, fire up a script in Outlook to automatically refresh the > browser window/tab, copy the content across into a new email and send > it off. Simply opening the HTML file won't cut it since it only shows > the HTML code in the email, making it virtually unreadable. Of course > if anybody can tell me how to get Outlook to render the code rather > than display it, things would be much neater and more efficient. > > The part I am stuck on atm is the "refreshing the browser window" and > "copy to the clipboard". > > Sorry for my ignorance but I'm not very familiar with Windows > scripting and have been "thrown into cold water" here. > > I've spent the last few days searching the web left, right and centre > for ideas but couldn't find anything useful so far. Any ideas how I > can get this done? appropriately, one could use SendKeys. It's not a reliable method, but it is what you are asking for. ' For IE... set WshShell = WScript.CreateObject("WScript.Shell") WshShell.SendKeys "{F5}" 'Refresh Wscript.Sleep 500 'Pause 1/2 second WshShell.SendKeys "^A" 'Select all Control+A Wscript.Sleep 500 'Pause 1/2 second WshShell.SendKeys "^c" 'Copy Control+C Wscript.Sleep 500 'Pause 1/2 second ' Google for commands to send an email. -- Todd Vargo (Post questions to group only. Remove "z" to email personal messages) |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Copy & paste from IE/FF into a new Outlook email via VBScript On Mar 23, 2:03*pm, "Todd Vargo" <tlva...@xxxxxx> wrote: Quote: > > For those who don't want to learn scripting to read/parse a file > appropriately, one could use SendKeys. It's not a reliable method, but itis > what you are asking for. > > ' For IE... > set WshShell = WScript.CreateObject("WScript.Shell") > WshShell.SendKeys "{F5}" 'Refresh > Wscript.Sleep 500 'Pause 1/2 second > WshShell.SendKeys "^A" 'Select all Control+A > Wscript.Sleep 500 'Pause 1/2 second > WshShell.SendKeys "^c" 'Copy Control+C > Wscript.Sleep 500 'Pause 1/2 second > ' Google for commands to send an email. > > -- > Todd Vargo > (Post questions to group only. Remove "z" to email personal messages) I was afraid there isn't a neater solution for this, other than sending key strokes. It's not that I don't want to learn but more a case of "We need this yesterday, so just do it.". I got around this by simply using my brain, reading up on a few things and using the "HTMLBody" property of an Outlook mail. This way I don't have to worry about copy and paste but simply read the HTML file into a string and set this string as the message body. Works a charm ![]() Cheers Tom |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Copy & paste from IE/FF into a new Outlook email via VBScript Hi Tom, You might try lynx : http://lynx.isc.org/ This is an ascii browser that is up to the task of downloading an HTML page. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| How to copy Outlook Email to Memory Stick | Vista mail | |||
| Copy & Paste Email Address's NOT ! | Live Mail | |||
| Copy and paste | General Discussion | |||
| Copy / paste doesn't copy pictures | Vista General | |||
| Copy and paste | Vista performance & maintenance | |||