ImagePro>Assign excel file names


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ImagePro>Assign excel file names



All -

I need to automatically save an excel file with a file name generated 
within an image pro macro.  I hope to save the the data file with the same 
name as the saved image and report.  Here's the code:

         Dim IName As String * 255
         Dim Rname As String * 255
         Dim xlName As String * 255
         .
         .
         .
         IName = "D:\OtolithReads\Images\" & CollectionNumber & ".TIF"
         Rname = "D:\OtolithReads\Reports\" & CollectionNumber & ".rpt"
         xlName = "D:\OtolithReads\DataFiles\" & CollectionNumber & ".xls"
         .
         .
         .
         ret = IpWsSaveAs(IName, "TIF")
         ret = IpRptSave(Rname)
         .
         .
         .
         xlapp.ActiveWorkbook.SaveAs Filename:= xlname, 
FileFormat:=xlNormal, Password:="", WriteResPassword:="", 
ReadOnlyRecommended:=False, CreateBackup:=False


Excel seems to be having a problem with the quotation marks.  If I specify 
a file name, ie "D:\Directory\File.xls" instead of the variable xlname the 
command works fine.  Also, for xlname I have tried Chr(34) & 
"D:\OtolithReads\DataFiles\" & CollectionNumber & ".xls" & Chr(34) which 
didn't work either.  Any suggestions?


Thanks in advance.



****************************************************************
John Fortuna
Research Associate
University of Miami
Rosenstiel School of Marine and Atmospheric Science

4600 Rickenbacker Cswy.
Miami, FL 33149
phone: 305.361.4670
fax: 305.361.4600
email: jfortuna@rsmas.miami.edu
*****************************************************************


***********************************************************
Need an Image-Pro macro or driver? Find it at http://www.Solutions-Zone.com
Got an Image-Pro macro or driver? Add it to http://www.Solutions-Zone.com
***********************************************************

This message is sent to you because you are subscribed to <imagepro-users@lists.mediacy.com>.
To unsubscribe, email to: <imagepro-users-off@lists.mediacy.com>
To switch to the DIGEST mode, email to <imagepro-users-digest@lists.mediacy.com>
To switch to the INDEX mode, email to <imagepro-users-index@lists.mediacy.com>
Send administrative queries to  <imagepro-users-request@lists.mediacy.com>
To subscribe or unsubscribe visit http://www.solutions-zone.com/ipednld/subscriber.asp



Search this Archive