Microsoft Word Suite
247
Example
This example opens or activates the data source attached to the document named "Sales.doc."
edit data source data merge of document "Sales.doc"
Command: edit header source
Opens the header source attached to a data merge main document, or activates the header source if
it's already open.
Note If the data merge main document doesnt have a header source, this method causes an error.
Syntax
edit header source data merge Required. An expression that returns a data merge object.
Example
This example attaches a header source to the active document and then opens the header source.
set main document type of data merge of active document to document type ¬
form
letters
open header source data merge of active document ¬
name "Macintosh HD:Users:Shared:Header.doc"
edit header source data merge of active document
This example opens the header source if the active document has an associated header file attached
to it.
set DM to data merge of active document
if (state of DM is main and source and header) or (state of DM is ¬
main and header) then
edit header source DM
end if
Command: edit main document
Activates the data merge main document associated with the specified header source or data source
document.
Note If the main document isnt open, an error occurs. If the main document isnt currently open,
use the open command.
Syntax
edit main document data merge Required. An expression that returns a data merge object.