control the insertion point

T

thalos

Lol


004CCEC9X01
008203D thalos ‘this line will be deleted
004CCECSCASB ‘ this line will be selected

‘If the string has been found
ElseIf ((InStr(objWdOldt.Text, thalos) <> 0)) Then
objWdOldt.Delete
Selection.Expand wdLine
Set objWdinsert = Selection.Range
objWdinsert.InsertAfter "thalos"
Selection.GoTo wdGoToLine, wdGoToNext


Become this

004CCEC9X01
thalos004CCECSCASB

I wish this

004CCEC9X01
004CCECSCASB thalos

How to control the insertion point ?
Thank you for your patience .
 
W

Word Heretic

G'day thalos <[email protected]>,

Maybe what you need is this:

change

Selection.Expand wdLine
Set objWdinsert = Selection.Range
objWdinsert.InsertAfter "thalos"

to

Selection.Expand wdLine
Selection.collapse wdcollapseend
Selection.move wdcharacter,-1
Selection.InsertAfter "thalos"


Steve Hudson
Word Heretic Sydney Australia
Tricky stuff with Word or words

Email: WordHeretic at tpg.com.au


thalos was spinning this yarn:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top