I try to run the macro by View/Macro/ViewMacros/highlighting the macro 'MMM' and /Run. I then get the error message. Closing that error window I then press Debug and nothing happens. No highlighting and there is no list of Projects. but the error Macro is as follows
Code:
Sub MMM()
'
' MMM Macro
'
'Call OpenDoc("E:\DOCUMENTS\MMM\LETTER.doc")
Selection.MoveDown Unit:=wdLine, Count:=6
End Sub
Sub OpenDoc(StrDoc As String)
Documents.Open FileName:="StrDoc", ConfirmConversions:=False, ReadOnly:= _
False, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:= _
"", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="", _
Format:=wdOpenFormatAuto, XMLTransform:=""
I shall re copy this outside the code brackets and so it should show just as text if that makes any difference
Sub MMM()
'
' MMM Macro
'
'Call OpenDoc("E:\DOCUMENTS\MMM\LETTER.doc")
Selection.MoveDown Unit:=wdLine, Count:=6
End Sub
Sub OpenDoc(StrDoc As String)
Documents.Open FileName:="StrDoc", ConfirmConversions:=False, ReadOnly:= _
False, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:= _
"", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="", _
Format:=wdOpenFormatAuto, XMLTransform:=""