![]() |
#1
|
|||
|
|||
![]()
I use Word 2019 + Windows 10, any code that closes the document without saving changes causes Word to crash (closes all open documents, reopen asking for safe mode), a simple example:
Code:
Private Sub Document_Open() MsgBox "Hi" Set odoc = ActiveDocument odoc.Paragraphs(1).Range.Text = "Hi" odoc.Close savechanges:=wdDoNotSaveChanges End Sub Only occurs when running from automatic procedure (like Document_Open). Do not occurs when running by keyboard shortcut. Does not ocurrs in Office 2010. I have already tried reinstalling and to update Office. Any ideas? Thanks.
__________________
Backup your original file before doing any modification. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
The <toggleButton.../> of the first document open crashes word when closing the second on | Ddadoo57 | Word VBA | 5 | 03-23-2023 05:32 AM |
How can I re-populate my userform after closing the document? | pfigen@gmail.com | Word VBA | 2 | 05-05-2022 02:08 AM |
![]() |
cnethercott | Word | 1 | 01-16-2017 03:21 AM |
Closing space between document and vertical ruler | ToddPr | Word | 6 | 08-28-2014 12:12 PM |