Skip to content

Word - Paragraphs have a uniqueLocalId of null #4258

@ddonushev

Description

@ddonushev

Your Environment

  • Platform: PC desktop
  • Host: Word
  • Office version number: 2308 (Build 16731.20600 Click-to-Run)
  • Operating System: Windows 11 E, 10.0.22631

Expected behavior

The uniqueLocalId property of a Word.Paragraph should be a GUID string.

Current behavior

The uniqueLocalId property of a Word.Paragraph is always null.

Steps to reproduce

  1. Using the hello-world-example, but practically any add-in where you access a paragraph's unique id would do.
  2. Replace the contents of the original sayHello() function lines 27-34 with the following:
Word.run(async (context) => {
  const firstParagraph = context.document.body.paragraphs.getFirst();
  firstParagraph.load("uniqueLocalId");
  await context.sync();
  console.log(firstParagraph.uniqueLocalId);
});
  1. Run this in desktop Word as you do: office-addin-debugging start src/manifest.xml desktop.
  2. Observe that the uniqueLocalId is null.

Additional details

  1. Office.isSetSupported("WordApi", "1.6") returns false, which shouldn't be the case - and it does so for 1.1 too.
  2. I cannot reproduce this issue on the web version. Unique IDs are returned as expected there.
  3. I could very well be missing something obvious.

Metadata

Metadata

Labels

Area: WordIssue related to Word add-ins

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions