Skip to content

Custom settings are not present in files retrieved using getFileAsync() #6434

@mpk

Description

@mpk

Your Environment

  • Platform: PC desktop, macOS desktop
  • Host: Word
  • Office version number: 2511 Build 16.0.19426.20218 (Windows), 16.103.1130.3 (macOS)
  • Operating System: Windows 10, macOS 15.7

Expected behavior

When I store custom settings in the document (using Office.context.document.settings interface), I expect them to be present in the DOCX file after retrieving it using getFileAsync method.

Current behavior

After saving custom settings and retrieving the DOCX file using getFileAsync method, the settings are missing from the file.
However, when saving the file using File -> Save action in Word, the settings are present in the file.

Steps to reproduce

  1. Set custom setting
Office.context.document.settings.set('testKey', 'testValue');
Office.context.document.settings.saveAsync();
  1. Retrieve the file
Office.context.document.getFileAsync(Office.FileType.Compressed, ...)
  1. Inspect the DOCX file as a ZIP file - folder word/webextensions is missing (where the custom settings should be stored)

Link to live example(s)

I set up a repository for this issue - simply load the manifest file in Word, open the add-in, click Set property and then Save. Compare this file contents with a file saved using File -> Save action in Word.

DOCX file saved using getFileAsync:
Image

DOCX file saved using File -> Save action in Word:
Image

Useful logs

  • I first noticed the issue in Office version 16.0.19328.20178
  • This is a regression, it has worked before
  • This issue does not appear in Office Online

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions