diff --git a/src/taskpane/components/MatchProperties.tsx b/src/taskpane/components/MatchProperties.tsx index c5f2e197..0155c38b 100644 --- a/src/taskpane/components/MatchProperties.tsx +++ b/src/taskpane/components/MatchProperties.tsx @@ -98,6 +98,7 @@ export const MatchProperties: React.FC = () => { "lineFormat/dashStyle", "lineFormat/color", "fill/transparency", + "fill/foregroundColor", "textFrame" ]); @@ -162,9 +163,10 @@ export const MatchProperties: React.FC = () => { targetShape.fill.transparency = firstShape.fill.transparency; } - // We're only copying fill transparency as the other fill properties - // like color and type appear to be read-only or not accessible in Office JS API - + if (firstShape.fill.foregroundColor !== undefined) { + targetShape.fill.foregroundColor = firstShape.fill.foregroundColor; + } + await context.sync(); propertiesApplied = true; } catch (err) {