Word Online 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 Online.
Tip: Word Online 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.