Paul, why do you think it is important for these source files to become templates? I presume this code is not contained in any of them since it is running before the source file is opened. I also presume that they are creating PDFs (via FinePrint) and not saving the source document in a Word format at all. I would have thought that making all the source files into separate templates makes it problematic to have a single 'attached template' that might contain code or standardised formatting across the suite of documents.
The improvements I would recommend for the code is:
1. Stop nagging with a MsgBox about Fineprint and just use Word's SaveAs to make a PDF (will need to ask what filename and location to save to).
2. Use the FileOpen dialog to allow the user to select the preferred source document and not have to type a part number - this solves the original question and avoids user typing errors. Rather than opening the file with their answer, use it with a Documents.Add method.
And are the search terms in any header/footers because that code is probably not finding those instances.
Rampum15 - is that what you want to achieve?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|