Results 1 to 1 of 1
Hybrid View
-
1st April 2014 17:25 #1Registered User
Join Date: May:2005
Location: Belene
Posts: 15
Application.FileSearch Word 2010 Macros
, , , , 2003. VBA .
Code:Sub mark_test() Dim Directory, File Directory = "I:\Press Analyse\keywords" With Application.FileSearch .FileName = "*.txt" .LookIn = Directory .Execute For I = 1 To .FoundFiles.Count File = .FoundFiles(I) File = Right(File, Len(.FoundFiles(I)) - (Len(Directory) + 1)) File = Left(File, Len(File) - 4) frmMark.ListBox1.AddItem (Trim(File)) Next I End With frmMark.ListBox1.SetFocus frmMark.Show End Sub Sub Find_keyword() Application.DisplayAlerts = wdAlertsNone Selection.Find.ClearFormatting Selection.Find.Font.Size = 11 Selection.Find.Font.Color = vbRed With Selection.Find .Text = "" .Replacement.Text = "" .Forward = True .Wrap = wdFindAsk .Format = True .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute End Sub Sub Paste_Unformat() Application.DisplayAlerts = wdAlertsNone Selection.PasteSpecial Link:=False, DataType:=wdPasteText, Placement:= _ wdInLine, DisplayAsIcon:=False End Sub Sub Upload_WithA() Call Upload_data(1) End Sub Sub Upload_WithoutA() Call Upload_data(0) End Sub Sub Paste_f11() Selection.TypeText Text:="===============================================================" End Sub Sub Paste_f12() Selection.TypeText Text:=";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;" End Sub




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in