To insert Field in a Word document, select the Quick Parts option from Insert tab
Click on the Field, which will throw the following dialog box
Select appropriate field and enter the values
Welcome to VBA Tips & Tricks. All VBA related information will be posted on this blog. Of late, VBA has been disregarded by many software professionals for .Net, c# and other technologies. This blog will also post articles related to them too Happy reading
i thought this was a vba tips and tricks site? where's the vb code?
ReplyDeleteThis is possible, but difficult, with VBA. See the Microsoft help page on Fields:
ReplyDeletehttp://msdn.microsoft.com/en-us/library/office/ff839569(v=office.15).aspx
The examples do not declare the Object they use to add the field.
This should insert the creation date of the document where the cursor is located at the time of running.
ReplyDeleteSelection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"CREATEDATE \@ ""M.d.yyyy"" ", PreserveFormatting:=True