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
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