![]() |
|
#3
|
|||
|
|||
|
Thanks Graham: I somehow managed to created a macro (maybe I'm not as dummy as I though)
Dim wbname As String Dim pathONLY, filePATH, fileONLY As String Dim datefrom As String Dim dateto As String ' Selection.Find.ClearFormatting With Selection.Find .Text = "????.??.??" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Find.Execute Selection.Copy datefrom = Selection.Text datefrom = Right(datefrom, 8) Selection.Find.Execute Selection.Copy dateto = Selection.Text dateto = Right(dateto, 8) wbname = datefrom & "-" & dateto filePATH = ActiveDocument.FullName fileONLY = ActiveDocument.Name pathONLY = Left(filePATH, Len(filePATH) - Len(fileONLY)) ChangeFileOpenDirectory pathONLY ActiveDocument.SaveAs FileName:=pathONLY & wbname & ".doc", FileFormat:= _ wdFormatDocument, LockComments:=False, Password:="", AddToRecentFiles:= _ True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:= _ False, SaveNativePictureFormat:=False, SaveFormsData:=False, _ SaveAsAOCELetter:=False thanks again for quick answear |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Open file which contains specific words in title | Nick70 | PowerPoint | 2 | 06-08-2016 06:55 AM |
| Macro to highlight repeated words in word file and extract into excel file | aabri | Word VBA | 1 | 06-14-2015 07:20 AM |
| Word for Mac 2011: Change default open/save file locations? | cglenn | Word | 0 | 06-01-2015 10:34 AM |
| Unable to open PST file, asking for Password, never created one!?!? | Stompandgo | Outlook | 1 | 04-21-2015 12:07 PM |
| Unable to File>Save As.. or Open in Word 2010, please help | BrokenComputer | Word | 0 | 03-07-2012 10:20 PM |