compile error - named arguement already specified - Selection.EndK

T

turneg02

I keep getting this error and i dont know why. It comes from this line of
code and its because of be when i change the unit to wdstory (previously i
left it out)

ps i want it to select everything within a cell , will wdstory do this?

Selection.EndKey , unit:=wdStory, Extend:=wdExtend

'code which is causing problem

If Selection.Find.Found = True Then

Selection.Move unit:=wdCell, Count:=12
Selection.EndKey unit:=wdColumn, Extend:=wdExtend
Selection.MoveRight unit:=wdCharacter, Count:=1, Extend:=wdExtend
'
Selection.Copy
Selection.Move unit:=wdCell, Count:=-13
Selection.Paste

Selection.EndKey unit:=wdColumn



Selection.HomeKey
'Selection.ClearFormatting
Selection.EndKey , unit:=wdStory, Extend:=wdExtend ' error line
 

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