so im trying to add a task to my vault that exports a jpeg of each configuration in the file and name the jpeg using a configuration specific custom property (Partno).
i believe ive found the right chunk of code but im unsure of how to execute the get command to recieve the property and output it into the correct variable to be used.
Function GetFullFileName(convFileName, conf, i, itemCount) ' Configuration name may include backslash. Remove it since otherwise saving will ' fail due a missing directory conf = Replace(conf, "\", "") conf = Replace(conf, "/", "") finalFileName = Replace(convFileName, "<Configuration>", conf) ' If no configuration If finalFileName = convFileName And itemCount > 0 Then finalFileName = Left(convFileName, InStrRev(convFileName, ".") - 1) & "_" & i & Mid(convFileName, InStrRev(convFileName, ".")) End If ' Remove illegal characters from filename finalFileName = Replace(finalFileName, "<", "") finalFileName = Replace(finalFileName, ">", "") finalFileName = Left(finalFileName, 2) + Replace(finalFileName, ":", "", 3) ' Don't start from begin since drive has : finalFileName = Replace(finalFileName, "*", "") finalFileName = Replace(finalFileName, "?", "") finalFileName = Replace(finalFileName, """", "") finalFileName = Replace(finalFileName, "|", "") GetFullFileName = finalFileName End Function
GetFullFileName = finalFileName End Function
any help on where to go from here would be great.
thanks
so i have figured this out, and here is how.
first i tried to just dump the var value function into getfullfilename and that didnt work then i realised convfilename is not the same as docfilename so i added the requirement for a docfilename into getfullfilename, so it looks like this.
then you just need to find everylocation that getfullfilename is used and add docfilename like so
convFileNameTemp = GetFullFileName(convFileName, "All", 0, 0, docFileName)
thanks and good luck