Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Accessing other programs through VBA

I am trying to create a sub-routine that will allow me to access and send
commands to a non-Microsoft product (in this case a scanner program). Can
anyone suggest a means of doing this. I've tried Shell and Send Keys but it's
not working.

Thanks.

--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Accessing other programs through VBA

Does the other program have any API's that you can use to manipulate the
functions of the external program? If not then (to the best of my knowledge)
you are hooped.
--
HTH...

Jim Thomlinson


"J Streger" wrote:

I am trying to create a sub-routine that will allow me to access and send
commands to a non-Microsoft product (in this case a scanner program). Can
anyone suggest a means of doing this. I've tried Shell and Send Keys but it's
not working.

Thanks.

--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Accessing other programs through VBA


"J Streger" wrote in message
...
I am trying to create a sub-routine that will allow me to access and send
commands to a non-Microsoft product (in this case a scanner program). Can
anyone suggest a means of doing this. I've tried Shell and Send Keys but

it's
not working.

Thanks.

--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003



Not exactly what you requested, but might help point in the right direction
using Windows Script Host to overcome HP Precisionscan software's lack of
ability to change the default settings to match the lower resolution needed
for a particular routine project.
WSH supposedly can startup the scanning software as well but i never found
the typo in those lines so removed them and went with a simple batch file
instead.

scan.bat
goto start
runs HP Precision Scan then changeresolution.vbs to change Image Resolution
to 75-dpi since cant permanetly change within program then preveiw the first
page
:start
"C:\Program Files\Hewlett-Packard\HP PrecisionScan\PrecisionScan
LTX\hppsapp.exe"
cscript c:\bat\changescanresolution.vbs
exit

changescanresolution.vbs
'wait 5 seconds for Scanner to load via a popup then change default image
resolution to 75-dpi
'then change output to File and preview the first item
'----------------------------------------------
Dim Wsh
Set Wsh = Wscript.CreateObject("Wscript.Shell")
wsh.Popup "Wait for Scanner to load", 30, "Wait...",64
Wsh.AppActivate "HP PrecisionScan LTX"
Wsh.SendKeys "%grc{tab}{tab}{tab}{tab}200~{tab}~"
Wsh.Sendkeys "%wf"
Wsh.Sendkeys "%n"



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
run external programs Stephen Miller Excel Discussion (Misc queries) 1 May 24th 10 09:40 PM
Going Between Programs bscuga Excel Discussion (Misc queries) 1 May 6th 08 03:43 PM
Programs not responding PA Bear [MS MVP] Excel Discussion (Misc queries) 3 March 16th 08 02:43 AM
VBA programs [email protected] Excel Programming 1 August 5th 05 11:32 AM


All times are GMT +1. The time now is 03:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"