Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #35  
Old 09-25-2012, 03:41 AM
muster36 muster36 is offline Macro errors Windows 7 64bit Macro errors Office 2010 32bit
Novice
Macro errors
 
Join Date: Aug 2011
Posts: 23
muster36 is on a distinguished road
Default

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Errors in Outlook.pst Rik_StHelens Outlook 0 12-20-2010 09:40 AM
Strange errors omirza Excel 0 02-05-2010 01:30 PM
Macro errors Encryption XOR - any errors??? Word Doc Word 1 10-08-2009 12:57 AM
COM Automation Errors ivanm Word 0 03-23-2009 07:02 PM
How do you fix ost in use errors? enviroko Outlook 0 10-23-2008 09:49 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:18 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft