First of all copy and paste this thread and print it out.<br>
<br>
Go in Access<br>
Add a command button to your form. <br>
In "Categories" list choose "Application"<br>
In "Actions" list chose "Run Application" DO NOT choose "Run MS Word" it won't work correctly in this instance.<br>
Find Words command line and finish it out.<br>
Right click on the button and open the code view.<br>
<br>
Here is an example of mine <br>
Also if you don't know where Word is, look at mine it will help you find it.<br>
There are more lines it made, I just go the basics we need.<br>
<br>
Dim stAppName As String<br>
<br>
stAppName = "E:\Microsoft Office2000\Office\WINWORD.EXE"<br>
Call Shell(stAppName, 1)<br>
<br>
On this line <br>
stAppName = "E:\Microsoft Office2000\Office\WINWORD.EXE"<br>
add the following like so to the end of the line. Don't use those continuation things it needs to be on one long line.<br>
stAppName = "E:\Microsoft Office2000\Office\WINWORD.EXE" & " " & "C:\Test.doc" & " " & "/Mmacroname"<br>
OK notice we have: Application name and a blank space, Document name and a blank space, then /M (which runs a macro) and the macro name with no space between /M and macro name<br>
NOW the macro name can NOT have any spaces it either. If yours does re-name it.<br>
<br>
See any program when launched can be passed the Name of it's document and a option such as Run Macro.<br>
You probably guessed that if you created a short cut on your desktop that it is fair game and YES you can edit it do the same thing.<br>
<br>
So to load Access and be on the form to run your word thing create a short cut on your desktop and follow the same procedure.<br>
BUT in Access use "/X Macroname" <br>
AND IN Access there has to be a space between /X and the macro name. In Word its all jammed together with no space "/Mmacroname" <br>
Also remember after the document name there must be a space before the macro command.<br>
<br>
OK and soon you will find all sorts of uses for the "One Click Icons" as I call them.<br>
I got a whole desk top full of them….<br>