Thread: Macro errors
View Single Post
 
Old 09-16-2012, 05:39 AM
muster36 muster36 is offline Windows 7 64bit Office 2010 32bit
Novice
 
Join Date: Aug 2011
Posts: 23
muster36 is on a distinguished road
Default

Full macro below. Even with Sub MMM() inserted get
code line, highlighted in red below, highlighted with the message

Compile error
Ambiguous name detected:OpenDoc

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:=""
End Sub
Reply With Quote