Script needed asap to rename linked graphic folder path name in FM11
Hello,
I am using FrameMaker 11 in the Technical Communication Suite 4 and I am looking for a script that can "hopefully" take care
of these two issues.
Here they are:
- I need to rename the linked FrameMaker 11 graphic paths in a folder full of FrameMaker files. For example, I need to change: \FrameMaker Book\Graphics\
to: \FrameMaker_Book_A\Graphics_Catalog\ - I have already renamed all the graphics using the script below, but now need a script that will update to the new graphic file path and new graphic file name, using a two column table.
So, to make it simple, the FrameMaker script would open the two columns (for example in a FrameMaker table in a stand-alone file), and then search out (like a Windows Grep) for the old file path and old graphic file path, find the old path and then come back to that FrameMaker table and insert the new file path and graphic name from the second column in that FrameMaker table.
Next, the script would go down to the next FrameMaker entry down in the first column and repeat the process until it is done.
Sub RenameFiles()
' Modify as needed but keep trailing backslash
Const strPath = "C:\Temp1\"
Dim r As Long
Dim n As Long
n = Cells(Rows.Count, 4).End(xlUp).Row
For r = 5 To n
Name strPath & Cells(r, 4) As strPath & Cells(r, 5)
Next r
End Sub
The code above does a fanstastic job (in Excel) at renaming thousands of graphics, but I now need a script (preferably in FM without having to save out to MIF) that will find the old graphic and old graphic path in a folder full of documents and then reference a FrameMaker file (or Excel file if needed) and do the line for line swap all the way down the column rows.
If nothing comes up, I will have to do it by hand (grunt work) and I really do not have the luxury of time, at the moment. Besides, why do something by hand when an automated script can do it for you...
Thanks in advance for any ideas.
Regards,
JIm
