Setting Up a Document > About automating tasks > Copying and pasting steps between documents

 

Copying and pasting steps between documents

Each open document has its own history of steps. You can copy steps from one document and paste them into another.

Note: Copy Steps (a button in the History panel) is different from Copy (in the Edit menu). You can't use Edit > Copy to copy steps, though you do use Edit > Paste to paste them.

Closing a document clears its history. If you know you will want to use steps from a document after that document is closed, copy the steps with Copy Steps (or save them as a command; see Creating new commands from history steps) before you close the document.

Be careful when copying steps that include a Copy or a Paste command:

Don't use Copy Steps if one of the steps is a Copy command; you may not be able to paste such steps the way you want.
If your steps include a Paste command, you can't paste those steps, unless the steps also include a Copy command before the Paste command.

If you paste steps into a text editor or into the Code view or the Code inspector, they appear as JavaScript code. This can be useful for learning to write your own scripts. For more information on using JavaScript in Dreamweaver, see Extending Dreamweaver: Basics.

To reuse steps from one document in another document:

1 Start from the document containing the steps you want to reuse.
2 Select the steps in the History panel.
3 Click the History panel's Copy Steps button to copy those steps.
4 Open the other document.
5 Place the insertion point where you want it, or select an object to apply the steps to.
6 Choose Edit > Paste to paste the steps.
The steps are played back as they're pasted into the document's History panel. The History panel shows them as only one step, called Paste Steps.