Closed LouisLeNezet closed 4 years ago
Hi @LouisBzh,
thank you very much for your appreciation of this add-in and for recommending it! You have explained yourself absolutely perfectly and your troubleshooting steps have been very accurate, which I also appreciate a lot.
As stated in code comments, method assignColor
has been introduced to properly copy color attributes regardless of whether they have been picked in the slide color scheme or they have been freely set as an RGB value. To be honest, I'm not able to reconstruct whether copying the color attribute as an RGB value always worked. In any case, preserving the original scheme color whenever applicable ensures that any subsequent variations to this color are also applied to the relevant shapes.
Coming to your problem, you have just revealed a code flaw: in fact, the assignment at line 326 is always checked for syntactical correctness by the compiler regardless of whether the preceding conditional expression evaluates to true or false:
If Int(Mid$(Application.Version, 1, Len(Application.Version) - 2)) > 12 Then
' The brightness level is referred to the color in the
' first row of the color palette (that is, the scheme color)
col1.Brightness = col2.Brightness
End If
In your PowerPoint 2007 the expression evaluates to false as attribute Brightness
is unsupported, but assignment col1.Brightness = col2.Brightness
is still checked by the compiler, causing the error you are seeing.
As a smallest workaround, this assignment can simply be suppressed, thus possibly reducing color accuracy in a few corner cases. I will try to review the code to seek for a more definitive solution, possibly by further simplifying method assignColor
.
Issue fixed in the freshly published 1.23 release of PPspliT.
Further investigation confirmed the need for the current level of complexity of method assignColor
, because sometimes it is just not possible to simply copy the RGB value of a color (for example this happens for emphasis effects that change shape colors). For more information, see this comment.
I have worked around the problem by wrapping assignment of the Brightness
attribute in a separate subroutine.
Hi, First of all, I want to thank you very much for your work. I used it a lot for my presentations as a student. I have recommended it to many friends and colleagues and will continue to do so.
I have a little problem currently with PPsplit. I reinstalled it on my computer using your installer. I have a 2007 version of power point on a Windows 8.1 The point is that even with a simple single slide with three lines each appearing with a click, an error message appears. It said "Compile error in hidden module: PPsplit" and "Macro not found or has been disabled due to your security settings" I did what you recommended in the Troubleshooting section and deleted all the .exd files. But that doesn't solve the problem. I checked my macro settings and everything is on. I am using your version 1.22 of PPsplit.
To fix the problem, I used your PPT12 + PPsplit.pptm directly and reproduced the problem. When using the PPsplit_main macro in the Developer menu, I get the message: "Method member or data not found" for the "Private Sub assignColor" function. So I checked which use of this function was problematic and it was that of "Private Sub copyFontAttributes" more precisely line 222 "assignColor f1.Color, f2.Color". In my example, the f1.Color and f2.Color values are 0 (is this normal?). When I replaced line 222 with f1.Color = f2.Color, the error goes away and everything seems to be working fine. Do you know why this happens?
I don't know if I explained correctly. I'm still new to development. Thank you once again for your excellent work!