Thread: Macro errors
View Single Post
 
Old 09-15-2012, 03:09 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

Thanks for the comment! I am trying - but obviously "very trying" to you!!! I hope I have posted the code tags correctly?!!
Have copied and pasted the instructions you gave and applied them to the macro for DavidCoupe.
When I run it I get the message Compile error:Ambiguous name detected:OpenDoc
As my Macros were all created using the Word links- View\Macros\RecordMacro I would have expected the codes created to run without changing. Not all PC users have the skills ( as my posts confirm!) to change the coding

Code:
Call OpenDoc("E:\DOCUMENTS\COUPE\D_C.dotm")
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
Thanks again for your patience and I hope it has not run out.................!

Last edited by macropod; 09-15-2012 at 03:16 AM. Reason: code re-structure
Reply With Quote