Yeah no worries - this is a copy of an answer I gave a while ago to the same
type of question
*****************************
There's a few mehtods - this is just one.
Create a new module
Function PrintDoc()
Dim WordObj As Object
Set WordObj = CreateObject("Word.Application")
WordObj.Documents.Open "Add path to Doc here"
WordObj.PrintOut Background:=False
WordObj.Quit
Set WordObj = Nothing
End Function
'Change Add path to DOC here to the real path to the DOC'
On a form add a button. Put this OnClick
Private Sub ButtonName_Click()
Call PrintDoc
End Sub
'Change ButtonName to what is really is'
OIf course in your case you would add this to the "if" - something like this
if right(field,3) = "doc" then
Call PrintDoc
else
Call PrintExcel
end if
Do the same for the excel file (but change wordobj and createobject)
If you have a number of paths you will need to declare the path as a
variable - link this (DIM) to your table field / form control
*******************************
In the same thread Albert Kallal gave a simply shell call that you may want
to try - another shell but they work fine
http://groups.google.com/group/micr...rint+word+from++group:microsoft.public.access