//Start updating the document
document.BeginUpdate();
//Create a DATE field at the caret position
document.Fields.Create(document.CaretPosition, "DATE");
document.Fields.Update();
//Finalize the modification
document.EndUpdate();

Field.vb

'Start updating the document
document.BeginUpdate()
'Create a DATE field at the caret position
document.Fields.Create(document.CaretPosition, "DATE")
document.Fields.Update()
'Finalize the modification
document.EndUpdate()

document.BeginUpdate();
//Insert the text to the document end
document.AppendText("SYMBOL 0x54 \\f Wingdings \\s 24");
document.EndUpdate();
//Convert the inserted text to the field
document.Fields.Create(document.Paragraphs[0].Range);
document.Fields.Update();

Field.vb

document.BeginUpdate()
'Insert the text to the document end
document.AppendText("SYMBOL 0x54 \f Wingdings \s 24")
document.EndUpdate()
'Convert the inserted text to the field
document.Fields.Create(document.Paragraphs(0).Range)
document.Fields.Update()

document.BeginUpdate();
//Create a DATE field at the caret position
document.Fields.Create(document.CaretPosition, "DATE");
document.EndUpdate();
for (int i = 0; i < document.Fields.Count; i++)
{
string fieldCode = document.GetText(document.Fields[i].CodeRange);
if (fieldCode == "DATE")
{
//Retrieve the range obtained by the field code
DocumentPosition position = document.Fields[i].CodeRange.End;
//Insert the format switch to the end of the field code range
document.InsertText(position, @"\@ ""M/d/yyyy h:mm am/pm""");
}
}
//Update all document fields
document.Fields.Update();

Field.vb

document.BeginUpdate()
'Create a DATE field at the caret position
document.Fields.Create(document.CaretPosition, "DATE")
document.EndUpdate()
For i As Integer = 0 To document.Fields.Count - 1
Dim fieldCode As String = document.GetText(document.Fields(i).CodeRange)
If fieldCode = "DATE" Then
'Retrieve the range obtained by the field code
Dim position As DocumentPosition = document.Fields(i).CodeRange.End
'Insert the format switch to the end of the field code range
document.InsertText(position, "\@ ""M/d/yyyy h:mm am/pm""")
End If
Next i
'Update all document fields
document.Fields.Update()