![]() |
#2
|
|||
|
|||
![]()
Well, I wallowed around in this one long enough. It seems that simply adding a DoEvents after the Documents.Add method eliminates the anomaly.
Sub Demo_LostSelection_AnomolyI() Dim oRng As Range Dim oDocTmp As Document ActiveDocument.Range.Text = "One two three" ActiveDocument.Words(1).Select Set oDocTmp = Documents.Add DoEvents oDocTmp.Close wdDoNotSaveChanges 'Notice after the procedure runs that the selection is reset to the start of the page. lbl_Exit: Exit Sub End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
m2ramos | Word VBA | 3 | 11-07-2022 05:54 AM |
Help with Selection VBA | JamesWood | Word VBA | 6 | 11-17-2020 06:46 AM |
![]() |
wardw | Word | 2 | 09-25-2019 09:19 AM |
![]() |
NobodysPerfect | Word VBA | 3 | 01-14-2015 12:58 PM |
![]() |
ramsgarla | Word VBA | 9 | 12-05-2012 03:23 AM |