From ba393bac878e9f2267f639c34b1e386b9b3628af Mon Sep 17 00:00:00 2001 From: Heiko Joerg Schick Date: Sat, 8 Mar 2025 00:22:18 +0100 Subject: [PATCH] Fixed fill for properties --- src/taskpane/components/MatchProperties.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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) {