D
dave_wilson
I have successfully been using a macro I created in Word to open several
documants, paste them together, save the combined document, and then close
all the documents. I created a new macro today using key strokes, but when I
run it I get a runtime error message 4605 that says "this method or property
is not available because no text is selected." I have been
able to create macros in earleir versions of Word without any difficulty
using key strokes. I did notice that 2003 adds several phrases in macros that
were not there in earlier versions of Word. Any suggestions would be greatly
appreciated. Here is the macro: ( The line with the error is noted by
"******"
ChangeFileOpenDirectory "C:\Wilsnrpt\customer\rettew\"
Documents.Open FileName:="3MD.DOC", ConfirmConversions:=False,
ReadOnly:= _
False, AddToRecentFiles:=False, PasswordDocument:="",
PasswordTemplate:= _
"", Revert:=False, WritePasswordDocument:="",
WritePasswordTemplate:="", _
Format:=wdOpenFormatAuto, XMLTransform:=""
Documents.Open FileName:="3EP.DOC", ConfirmConversions:=False,
ReadOnly:= _
False, AddToRecentFiles:=False, PasswordDocument:="",
PasswordTemplate:= _
"", Revert:=False, WritePasswordDocument:="",
WritePasswordTemplate:="", _
Format:=wdOpenFormatAuto, XMLTransform:=""
Documents.Open FileName:="3LGLS.DOC", ConfirmConversions:=False,
ReadOnly _
:=False, AddToRecentFiles:=False, PasswordDocument:="",
PasswordTemplate _
:="", Revert:=False, WritePasswordDocument:="",
WritePasswordTemplate:="" _
, Format:=wdOpenFormatAuto, XMLTransform:=""
Windows(1).Activate
Selection.EndKey Unit:=wdStory
Windows(3).Activate
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Copy
Windows(1).Activate
Windows(2).Activate
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.PasteAndFormat (wdPasteDefault)
Selection.Copy **********(this line is highlighted in yellow)
Windows(1).Activate
ActiveDocument.Close
ActiveDocument.Close
ActiveDocument.Close
End Sub
documants, paste them together, save the combined document, and then close
all the documents. I created a new macro today using key strokes, but when I
run it I get a runtime error message 4605 that says "this method or property
is not available because no text is selected." I have been
able to create macros in earleir versions of Word without any difficulty
using key strokes. I did notice that 2003 adds several phrases in macros that
were not there in earlier versions of Word. Any suggestions would be greatly
appreciated. Here is the macro: ( The line with the error is noted by
"******"
ChangeFileOpenDirectory "C:\Wilsnrpt\customer\rettew\"
Documents.Open FileName:="3MD.DOC", ConfirmConversions:=False,
ReadOnly:= _
False, AddToRecentFiles:=False, PasswordDocument:="",
PasswordTemplate:= _
"", Revert:=False, WritePasswordDocument:="",
WritePasswordTemplate:="", _
Format:=wdOpenFormatAuto, XMLTransform:=""
Documents.Open FileName:="3EP.DOC", ConfirmConversions:=False,
ReadOnly:= _
False, AddToRecentFiles:=False, PasswordDocument:="",
PasswordTemplate:= _
"", Revert:=False, WritePasswordDocument:="",
WritePasswordTemplate:="", _
Format:=wdOpenFormatAuto, XMLTransform:=""
Documents.Open FileName:="3LGLS.DOC", ConfirmConversions:=False,
ReadOnly _
:=False, AddToRecentFiles:=False, PasswordDocument:="",
PasswordTemplate _
:="", Revert:=False, WritePasswordDocument:="",
WritePasswordTemplate:="" _
, Format:=wdOpenFormatAuto, XMLTransform:=""
Windows(1).Activate
Selection.EndKey Unit:=wdStory
Windows(3).Activate
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Copy
Windows(1).Activate
Windows(2).Activate
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.Extend
Selection.PasteAndFormat (wdPasteDefault)
Selection.Copy **********(this line is highlighted in yellow)
Windows(1).Activate
ActiveDocument.Close
ActiveDocument.Close
ActiveDocument.Close
End Sub