Making copies of documents and code
You’ve got your project set up exactly how you want it. Your manuscript or reports are written, all linked to your code with StatTag. However, now you want to create a copy of that entire folder (document and code), and make changes just in that copy. Fortunately, StatTag does allow for this, but it will require you to make a few changes.
Imagine the following example. We have everything we need in our folder (Test1
) – our Word document, and our SAS file. This is the folder that we want to make a copy of.
We’ll make a copy and rename the new folder:
Link to the right code file
We need to change the copy of our Word document to point to the copy of our SAS code file.
- Open the copy of the Word document.
- From the StatTag menu, click “Code Files” to bring up the “Manage Code Files” dialog. Notice that even though you are in the copy of the Word document in the folder
Test1 - Copy
, it is still pointing to the original code file inTest1
.
- Select your code file (
test.sas
) and click the “Remove” button. - Click “Add”. Navigate to the folder
Test1 - Copy
and select your code file (test.sas
) - Click “OK”. StatTag will prompt you to update your tags to point to the copy of your code file.
- Under “Action to take”, select the option “Use file…” (pointing to the copy of the code file you just linked to).
- Click “OK”, and StatTag will update all of the tags in the Word document.
- Save your document.
Now, your copy of the Word document is linked to the copy of your code.
Confirming that it worked
Let’s test this out. Remember that the original code file had a value of 15. Let’s edit the copy of our code file and change that value to 25.
In Word, refresh the value of the tag. You’ll see it change from 15 to 25.
If you go back to the original folder (Test1
) and refresh the tags in the Word document in that folder, you’ll notice that the value is still 15. We now have two copies of our code and document, which can be modified and updated independently.
Recent Comments