473,419 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

Batch Print TIF Images - Build Dynamic Shell Statements

Bob
I have a query whose results contain the full path (i.e.
c:\Images\xxx.tif) to MUTI-PAGE (All two page) TIF documents.

I need to figure out how to BATCH print the tiff's using the path from
the query results.

I am trying to use the shell command to loop through the query results
and print using IrfanView's command line option.

I have the following code so far but it still isn't doing what I need.

I can't figure out how to get the MyPath variable. MyPath is also the
name of the query field that contains the path to the image.

Dim dbs As DAO.Database
Dim rst As DAO.Recordset

Dim MyPath As String

Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("qryMyPath")

MyPath = rst("MyPath")

While Not rst.EOF And Not rst.BOF
Shell "C:\Program Files\IrfanView\i_view32.exe" & MyPath & " /print",
vbHide
rst.MoveNext
Wend

Can anyone help me figure this out?

Thanks!

Nov 13 '05 #1
1 3740
so you don't know how to get the value from a *field* in your query?

Nothing to it - works the same as accessing a field in a recordset
based on a table.

SomeVariable=rst.Fields("FieldName")

or

SomeVariable = rst.fields(indexNumber)

for example:

SomeVariable= rst.fields(0)

(columns/fields are zero-based).

Does this answer your question? If not, could you restate it? I'm not
entirely sure of what you're asking. Once you have this field, you can
loop through the recordset and build your shell statement...

do until rst.eof
strPath = "C:\" & rst.fields(0) & "\" & rst.fields(1)
'do your shell execute here
rst.movenext
loop

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Moosebumps | last post by:
So, after reading some messages about os.system, and looking at the popen stuff and trying it a bit, I still have not found a way to keep a command window open for several commands (on Windows...
4
by: DG | last post by:
Hi, Can anyone advise how to execute multiple statements in a single query batch. For example- update customers set customer_name = 'Smith' where customer_name = 'Smyth'; select * from...
4
by: Bill | last post by:
I need help closing a CMD window when it is executed from Access. 1) The batch file is called from Access. 2) Access closes, 3) the batch runs a copy of the access database (creating a backup)...
12
by: Selva Chinnasamy | last post by:
Hi I am using batch commands against Ms-Access and getting an error Message "Characters found after end of SQL statement." String Here is my sql Dim str_screens As String = "Select * from Screens...
13
by: MLH | last post by:
I have a batch file named GetConf.bat. It contains a line like this: ipconfig /all >c:\MyAppDir\IPdata.txt I believe I could run the line with something like ShellWait by Terry Kreft. Any...
1
by: mvdkwong | last post by:
What's the trick to running a batch file from VBA? I'm trying to call it using the Shell function but it's not working for me. If I double-click the batch file or run it from the command line it...
61
by: phil-news-nospam | last post by:
Why does SVG need a different tag than other images? IMHO, SVG should be implemented as an image type just like any other image type, allowing it to work with <img> tags, and ... here is the...
2
by: fritz-bayer | last post by:
Hi, in a shell script of mine I'm executing a mysql SELECT in batch mode. I want to use the return value for other sql statements. The problem I'm facing is that the tabs, which seperate the...
2
by: Gave | last post by:
Hello Everyone! I have a web application with a datagrid, so the user can check on a check box to send the printer an png file that correspond with each datagrid row. I need to print the images...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.