![]() |
|
|
|
#1
|
||||
|
||||
|
It seems to me your code could be reduced to:
Code:
Sub RTFtoDOC()
Dim FName As String
Dialogs(wdDialogFileOpen).Show
Application.ScreenUpdating = False
FName = Dir("*.rtf")
While (FName > "")
Application.Documents.Open FileName:=FName, ReadOnly:=True, AddToRecentFiles:=False
ActiveDocument.SaveAs FileName:=FName, FileFormat:=wdFormatDocument
ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
FName = Dir()
Wend
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
Thanks for the reply. When I submit the suggested code the macro errors out.
"Run-time error '5155': we cant save this file because its read only. To keep your changes, you'll need to save the document with a new name or in a different location" Any idea how to get around this? Thanks, Mike. |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Macro Question: Need help making a macro to highlight the first word in every sentence
|
LadyAna | Word | 1 | 12-06-2014 10:39 PM |
Question about macro in word 2013
|
tombags | Word | 1 | 06-25-2014 04:56 PM |
Macro Needed to Insert Asnwer to A Question in Multiple Choice Format Question
|
rsrasc | Word VBA | 7 | 03-28-2014 12:28 PM |
A newbie question: a must to save macro word file as .docm?
|
tinfanide | Word VBA | 6 | 12-06-2011 03:02 PM |
Macro question
|
PaulY | Word VBA | 1 | 12-22-2010 11:21 PM |