05-22-2023
06:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
05-22-2023
06:05 AM
I don't test your code, but following line is really bad.
'Start a transaction for progress bar
Call ThisApplication.TransactionManager.StartTransaction(ThisDoc.Document, "Editing All Parts...")
Method StartTransaction returns Transaction object which !!!MUST BE CLOSED!!! in any way.
If you want to use transactions use the following pattern
Sub TransactionPatternSample()
Dim document As Document
Dim displayName As String
Dim t As Transaction = ThisApplication.TransactionManager.StartTransaction(document, displayName)
Try
'Do something in transaction
'Successful
t.End()
Catch ex As Exception
'Log or handle exception
'Failed
t.Abort()
End Try
End SubFor more info see this article