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

Re: compile error - named arguement already specified - Selection.EndK by Jezebel

Jezebel
Thu Jul 28 18:47:59 CDT 2005

Try removing the supefluous comma:

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

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

"turneg02" <turneg02@discussions.microsoft.com> wrote in message
news:2FFC534C-E0E7-43A5-83AF-65C938461133@microsoft.com...
>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