A
Andy Stewartson
Firstly this is my first real venture into VBA, normally I have used VB6 in
an engineering environment.
I am looking for some help in convert a large number of Visio files from VSD
to TIF using Visio 5. I have got to the point where I have got all the
filename in an array and but I have got stuck in how to process them. I
believe this should be fairly trivial, but I have got stuck
I have an array call vsd_filename() which contains all the filenames
I am expecting the code to look like this (mixture of air code and real)
Dim number_files as Integer
Dim vsd_filename() as String
dim output_filename as String
Dim DocObj As Visio.Document
redim vsd_filename(0)
get_filename vsd_filename() ' <- routine to get all the filename
number_files=ubound(vsd_filename)
for i = 0 to number_files
' load in filename
Set DocObj = Documents.Open(vsd_filename(i))
'
' create output filename exchange VSD for TIF at end
'
output_filename = Left(vsd_filename(i), (Len(vsd_filename(i) - 3))) +
"TIF"
' aircode below
' tif options need to be set
'
set tiff options
'
' save as tif file
'
save output_filename as tif file
' close file
DocObj.Close
next
Hopefully someone can translate/correct/throw away the above into something
useful.
Thanks in advance
Andy Stewartson
an engineering environment.
I am looking for some help in convert a large number of Visio files from VSD
to TIF using Visio 5. I have got to the point where I have got all the
filename in an array and but I have got stuck in how to process them. I
believe this should be fairly trivial, but I have got stuck
I have an array call vsd_filename() which contains all the filenames
I am expecting the code to look like this (mixture of air code and real)
Dim number_files as Integer
Dim vsd_filename() as String
dim output_filename as String
Dim DocObj As Visio.Document
redim vsd_filename(0)
get_filename vsd_filename() ' <- routine to get all the filename
number_files=ubound(vsd_filename)
for i = 0 to number_files
' load in filename
Set DocObj = Documents.Open(vsd_filename(i))
'
' create output filename exchange VSD for TIF at end
'
output_filename = Left(vsd_filename(i), (Len(vsd_filename(i) - 3))) +
"TIF"
' aircode below
' tif options need to be set
'
set tiff options
'
' save as tif file
'
save output_filename as tif file
' close file
DocObj.Close
next
Hopefully someone can translate/correct/throw away the above into something
useful.
Thanks in advance
Andy Stewartson