R
Rebecca
Greetings. I have made a macro that does the following: Finds a certain
letter in a certain font, selects the entire word, copies it, then in another
(bottom) pane in the same document makes a hyperlink and then goes back to
the upper pane. But I keep getting an error message at the third line from
the bottom (ActiveWindow.Next.Activate). Could someone please tell me where
the program is? I am ignorant of programming, so could you please explain in
easy English? The document contains a list of words.
Sub COG_LXX()
'
' COG_LXX Macro
' LIFEBOOK E8010Sì´(ê°€) 기ë¡í•œ 매í¬ë¡œ 2004-12-01
'
Selection.Find.ClearFormatting
With Selection.Find
.Text = "^$"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = False
.CorrectHangulEndings = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveDown Unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.Copy
Selection.MoveRight Unit:=wdCharacter, Count:=1
ActiveWindow.ActivePane.Next.Activate
Selection.PasteSpecial Link:=True, DataType:=wdPasteHyperlink
ActiveWindow.Next.Activate
ActiveWindow.ActivePane.Next.Activate
End Sub
letter in a certain font, selects the entire word, copies it, then in another
(bottom) pane in the same document makes a hyperlink and then goes back to
the upper pane. But I keep getting an error message at the third line from
the bottom (ActiveWindow.Next.Activate). Could someone please tell me where
the program is? I am ignorant of programming, so could you please explain in
easy English? The document contains a list of words.
Sub COG_LXX()
'
' COG_LXX Macro
' LIFEBOOK E8010Sì´(ê°€) 기ë¡í•œ 매í¬ë¡œ 2004-12-01
'
Selection.Find.ClearFormatting
With Selection.Find
.Text = "^$"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = False
.CorrectHangulEndings = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveDown Unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.Copy
Selection.MoveRight Unit:=wdCharacter, Count:=1
ActiveWindow.ActivePane.Next.Activate
Selection.PasteSpecial Link:=True, DataType:=wdPasteHyperlink
ActiveWindow.Next.Activate
ActiveWindow.ActivePane.Next.Activate
End Sub