Word for the web preserves field codes already in your document, but it doesn’t provide a way to add them or edit them.
Instead, if you have the Word desktop application, use the Open in Word command to open the document and insert or edit field codes.
When you’re done and you save the document, it will continue to store the field codes when you open it in Word for the web.
Tip: Word for the web works seamlessly with Word and other Office desktop programs, and we update it based on input like yours. For the latest feature announcements, visit the Office Online blog.