Chem4Word / Version3-2

Version 2022 (3.2) of Chem4Word - A Chemistry Add-In for Microsoft Word
https://www.chem4word.co.uk
Other
21 stars 2 forks source link

"Cannot edit Range" Error #36

Closed tomyan112 closed 2 years ago

tomyan112 commented 2 years ago

Describe the bug "Cannot edit Range" Error

To Reproduce Steps to reproduce the behaviour:

  1. Draw something on 2 different word document

  2. While it is calculating image

  3. Click a Chem4Word equation in another document

  4. See error

Screenshot image

Desktop (please complete the following information): Chem4Word beta 2

MikeWilliams-UK commented 2 years ago

@tomyan112 Thanks for the excellent description of the bug, which is one that has been present sinve V3.0 and nobody has yet reported it to us either here or in our Facebook group for support.

I now have something to look into, from your description I can see that our use of ActiveDocument property of the word application might be the issue here as it quite clearly will have changed with the scenario you have described.

MikeWilliams-UK commented 2 years ago

@deadlyvices it was as I now suspected caused by using Application.ActiveDocument which in this scenario changes during the rendering process.

I am going to review the use of Application.ActiveDocument to see if I can find any more gotchas before raising internal pull request.

MikeWilliams-UK commented 2 years ago

Many thanks for describing the scenario @tomyan112 the target release for this is V3.2.3

MikeWilliams-UK commented 2 years ago

Included in V3.2.3 Beta 3