Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Renaming scan files with a list of drawing names in excel spreadsh

The workflow is like this:
One person is creating the list of drawing name to be scanned in Excel.
Then another person is performing a kind of scanning, creating the files
(scan001, scan002, scan003 and so on.....
After that they want to rename the scanned drawings according to the list.
for example:-

Scan001 list of drawing names in excel sheet
scan002 list of drawing names in excel sheet
scan003 list of drawing names in excel sheet


Can anyone help me on this.
Thanks a lot.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Renaming scan files with a list of drawing names in excel spreadsh


I forgot to mention i am using Office 2000 excel

"ravi" wrote:

The workflow is like this:
One person is creating the list of drawing name to be scanned in Excel.
Then another person is performing a kind of scanning, creating the files
(scan001, scan002, scan003 and so on.....
After that they want to rename the scanned drawings according to the list.
for example:-

Scan001 list of drawing names in excel sheet
scan002 list of drawing names in excel sheet
scan003 list of drawing names in excel sheet


Can anyone help me on this.
Thanks a lot.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Renaming scan files with a list of drawing names in excel spreadsh

Ravi,
To get the scanned image into Excel, you can use this. Make sure the command
button has the .TakeFocusOnClick = False.

Private Sub CommandButton2_Click()
Dim cell As Range
Dim Counter As Long

Const FromScannerorCamera As Long = 1764
Const PicOffset As Long = 50

For Each cell In Range("rngFileNames")
Application.CommandBars.FindControl(, FromScannerorCamera).Execute
With Selection
.Name = cell.Text
.Left = Counter * PicOffset
Counter = Counter + 1
End With
Next

End Sub

If you want to talk directly to the scanner, look into using TWAIN from VBA.
Maybe one of these:
http://www.sharewareconnection.com/t...in-activex.htm

NickHK

"ravi" wrote in message
...
The workflow is like this:
One person is creating the list of drawing name to be scanned in Excel.
Then another person is performing a kind of scanning, creating the files
(scan001, scan002, scan003 and so on.....
After that they want to rename the scanned drawings according to the list.
for example:-

Scan001 list of drawing names in excel sheet
scan002 list of drawing names in excel sheet
scan003 list of drawing names in excel sheet


Can anyone help me on this.
Thanks a lot.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Renaming scan files with a list of drawing names in excel spre

Hi Nick,

Many Thanks for your reply.

What i want to do is just to rename the scanned files with the list of
drawing name which i type in excel.

For example: Scan001 will rename automatically to drawing name list created
in excel.

Please advise.
Thanks


Regards


"NickHK" wrote:

Ravi,
To get the scanned image into Excel, you can use this. Make sure the command
button has the .TakeFocusOnClick = False.

Private Sub CommandButton2_Click()
Dim cell As Range
Dim Counter As Long

Const FromScannerorCamera As Long = 1764
Const PicOffset As Long = 50

For Each cell In Range("rngFileNames")
Application.CommandBars.FindControl(, FromScannerorCamera).Execute
With Selection
.Name = cell.Text
.Left = Counter * PicOffset
Counter = Counter + 1
End With
Next

End Sub

If you want to talk directly to the scanner, look into using TWAIN from VBA.
Maybe one of these:
http://www.sharewareconnection.com/t...in-activex.htm

NickHK

"ravi" wrote in message
...
The workflow is like this:
One person is creating the list of drawing name to be scanned in Excel.
Then another person is performing a kind of scanning, creating the files
(scan001, scan002, scan003 and so on.....
After that they want to rename the scanned drawings according to the list.
for example:-

Scan001 list of drawing names in excel sheet
scan002 list of drawing names in excel sheet
scan003 list of drawing names in excel sheet


Can anyone help me on this.
Thanks a lot.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Renaming scan files with a list of drawing names in excel spre

Ravi,
OK then. Simplest routine, assuming all sequential. You should add error
trapping.
If your "SCANxxx" are listed next to the new file names and not sequentially
named, then you can use Dir() and VLOOKUP. Post back if you need more like
this.

Dim cell As Range
Dim Counter As Long

'Change to match your requirements
Const BASESCANNAME As String = "SCAN"
Const EXT As String = ".tif"
Const BASEDIR As String = "C:\"

ChDrive BASEDIR
ChDir BASEDIR

For Each cell In Range("rngFileNames")
Counter = Counter + 1
Name BASESCANNAME & Format(Counter, "000") & EXT As cell.Text & EXT
Next

NickHK

"ravi" wrote in message
...
Hi Nick,

Many Thanks for your reply.

What i want to do is just to rename the scanned files with the list of
drawing name which i type in excel.

For example: Scan001 will rename automatically to drawing name list

created
in excel.

Please advise.
Thanks


Regards


"NickHK" wrote:

Ravi,
To get the scanned image into Excel, you can use this. Make sure the

command
button has the .TakeFocusOnClick = False.

Private Sub CommandButton2_Click()
Dim cell As Range
Dim Counter As Long

Const FromScannerorCamera As Long = 1764
Const PicOffset As Long = 50

For Each cell In Range("rngFileNames")
Application.CommandBars.FindControl(, FromScannerorCamera).Execute
With Selection
.Name = cell.Text
.Left = Counter * PicOffset
Counter = Counter + 1
End With
Next

End Sub

If you want to talk directly to the scanner, look into using TWAIN from

VBA.
Maybe one of these:
http://www.sharewareconnection.com/t...in-activex.htm

NickHK

"ravi" wrote in message
...
The workflow is like this:
One person is creating the list of drawing name to be scanned in

Excel.
Then another person is performing a kind of scanning, creating the

files
(scan001, scan002, scan003 and so on.....
After that they want to rename the scanned drawings according to the

list.
for example:-

Scan001 list of drawing names in excel sheet
scan002 list of drawing names in excel sheet
scan003 list of drawing names in excel sheet


Can anyone help me on this.
Thanks a lot.








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Renaming scan files with a list of drawing names in excel spre

How to do it?

I have no knowledge on programming. How to write this codes? and where?



Regards
Ravi

"NickHK" wrote:

Ravi,
OK then. Simplest routine, assuming all sequential. You should add error
trapping.
If your "SCANxxx" are listed next to the new file names and not sequentially
named, then you can use Dir() and VLOOKUP. Post back if you need more like
this.

Dim cell As Range
Dim Counter As Long

'Change to match your requirements
Const BASESCANNAME As String = "SCAN"
Const EXT As String = ".tif"
Const BASEDIR As String = "C:\"

ChDrive BASEDIR
ChDir BASEDIR

For Each cell In Range("rngFileNames")
Counter = Counter + 1
Name BASESCANNAME & Format(Counter, "000") & EXT As cell.Text & EXT
Next

NickHK

"ravi" wrote in message
...
Hi Nick,

Many Thanks for your reply.

What i want to do is just to rename the scanned files with the list of
drawing name which i type in excel.

For example: Scan001 will rename automatically to drawing name list

created
in excel.

Please advise.
Thanks


Regards


"NickHK" wrote:

Ravi,
To get the scanned image into Excel, you can use this. Make sure the

command
button has the .TakeFocusOnClick = False.

Private Sub CommandButton2_Click()
Dim cell As Range
Dim Counter As Long

Const FromScannerorCamera As Long = 1764
Const PicOffset As Long = 50

For Each cell In Range("rngFileNames")
Application.CommandBars.FindControl(, FromScannerorCamera).Execute
With Selection
.Name = cell.Text
.Left = Counter * PicOffset
Counter = Counter + 1
End With
Next

End Sub

If you want to talk directly to the scanner, look into using TWAIN from

VBA.
Maybe one of these:
http://www.sharewareconnection.com/t...in-activex.htm

NickHK

"ravi" wrote in message
...
The workflow is like this:
One person is creating the list of drawing name to be scanned in

Excel.
Then another person is performing a kind of scanning, creating the

files
(scan001, scan002, scan003 and so on.....
After that they want to rename the scanned drawings according to the

list.
for example:-

Scan001 list of drawing names in excel sheet
scan002 list of drawing names in excel sheet
scan003 list of drawing names in excel sheet


Can anyone help me on this.
Thanks a lot.






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
Renaming Files w/Excel Confused VB Person Excel Discussion (Misc queries) 4 March 21st 08 09:26 AM
How to create a list of media files names in excel. joye68 Excel Discussion (Misc queries) 2 July 9th 07 05:12 AM
Why is MS Excel renaming worksheets (truncating names)? Is there a fix for this? Charles F. Radley Setting up and Configuration of Excel 8 June 14th 07 02:53 AM
Renaming scan files with a list of drawing names in excel spreadsh Ravi Excel Discussion (Misc queries) 1 February 8th 07 04:01 AM
Renaming Non-Excel Files QTGlennM Excel Programming 4 January 13th 07 10:11 PM


All times are GMT +1. The time now is 11:35 AM.

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

About Us

"It's about Microsoft Excel"