Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
save QM code as a word file
#11
The following VBA code can add a horizontal line in front of the line where # sub is located
The following code sometimes works unsteadily, why?
________________________________________________________________________________

Word.Find f=app.Selection.Find
f.ClearFormatting
f.Text="#sub"
rep
    if(!f.Execute)
        break
    app.Selection.ParagraphFormat.Borders.Item(wdBorderTop).LineStyle = wdLineStyleSingle

 
Code:
Copy      Help
 
Sub FindSubAddline()
    Selection.Find.ClearFormatting
    Selection.Find.Text = "#sub"
    Selection.Find.Execute
    Selection.ParagraphFormat.Borders(wdBorderTop).LineStyle = wdLineStyleSingle
End Sub


Messages In This Thread
save QM code as a word file - by macman - 01-18-2021, 08:05 AM
RE: save QM code as a word file - by macman - 01-19-2021, 12:53 AM
RE: save QM code as a word file - by Kevin - 01-19-2021, 01:37 AM
RE: save QM code as a word file - by macman - 01-19-2021, 03:09 AM
RE: save QM code as a word file - by Kevin - 01-19-2021, 05:33 AM
RE: save QM code as a word file - by macman - 01-19-2021, 11:07 PM
RE: save QM code as a word file - by macman - 01-20-2021, 08:37 AM
RE: save QM code as a word file - by macman - 01-21-2021, 05:29 AM
RE: save QM code as a word file - by Kevin - 01-21-2021, 08:29 AM
RE: save QM code as a word file - by macman - 01-21-2021, 08:39 AM
RE: save QM code as a word file - by macman - 01-21-2021, 10:12 AM
RE: save QM code as a word file - by macman - 01-22-2021, 06:25 AM
RE: save QM code as a word file - by Kevin - 01-22-2021, 11:44 PM
RE: save QM code as a word file - by macman - 01-23-2021, 12:34 AM
RE: save QM code as a word file - by Kevin - 01-23-2021, 12:42 AM
RE: save QM code as a word file - by macman - 01-23-2021, 12:49 AM
RE: save QM code as a word file - by Kevin - 01-23-2021, 12:53 AM
RE: save QM code as a word file - by macman - 01-23-2021, 12:58 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)