HowToFixComputers.com




Watched TopicsWatched Topics SearchSearch RegisterRegister Log in to check your private messagesLog in to check your private messages ProfileProfile Log inLog in
Problem with ADF and WIA

 
Post new topic   Reply to topic    Index -> Scanners
Author Message
alrashidmtz@gmail.com
Guest





PostPosted: Thu May 24, 2007 9:18 pm    Post subject: Problem with ADF and WIA Reply with quote

Hi,

I am trying to control ADF scanner (HP Scanjet 8250) using WIA and
VBscript. I can get it to scan once but when the next document loads
the process finish, and I get only one image. The code is below. Are
you willing to do some paid work to troubleshoot this?

Regards,


Dim objWia
Dim IP
Dim Img
Dim i

Set IP = CreateObject("Wia.ImageProcess")
Set Img = CreateObject("Wia.ImageFile")
Set objWia = CreateObject("Wia.Script")
Set objWia = objWia.Create(Nothing)

i=0
Set objSelectedItems = objWia.GetItemsFromUI(0,0)
For Each objItem In objSelectedItems
objItem.Transfer "c:\imagen" & i & ".bmp",false
if i=0 then
Img.LoadFile "c:\imagen" & i & ".bmp"
else
Set Img1 = CreateObject("Wia.ImageFile")
Img1.LoadFile "c:\imagen" & i & ".bmp"
IP.Filters.Add IP.FilterInfos("Frame").FilterID
Set
IP.Filters(IP.Filters.Count).Properties("ImageFile") = Img1
end if
i=i+1
Next
IP.Filters.Add IP.FilterInfos("Convert").FilterID
IP.Filters(IP.Filters.Count).Properties("FormatID") =
"{B96B3CB1-0728-11D3-9D7B-0000F81EF32E}" ' TIF
Set Img = IP.Apply(Img)
Img.SaveFile "c:\imagen.tif"

Al Rashid
alrashidmtz@gmail.com
Back to top
Fix your Windows Problems - FAST.
FREE Safe Scan Registry Check. Locate & Fix Errors in Minutes!
Display posts from previous:   
Post new topic   Reply to topic    Index -> Scanners All times are GMT
Page 1 of 1

 

 MemberlistMemberlist  UsergroupsUsergroups



Powered by p|-|pBB

Featured Sites: DIY Projects