talytech
03-09-2011, 07:22 AM
I would like to set up a variable that contains HTML and then use the Output acOutputfunction type to send the data to MS Word. When I do a simple test just to send a plain text variable I get an error.
I have a function called "outToWord" and another Function called "sendIt". Here is my code to "outToMSWord":
Function outToMSWord()
Dim x As String
x = "This is a test."
End Function
Here is my code to "sendIt"
Function sendIt()
DoCmd.OutputTo acOutputFunction, "outToMSWord", acFormatRTF, "C:\Documents and Settings\e3utbl\Desktop\FTPTest\Tasha.doc", -1
End Function
When I run that function I get a runtime error '3011': The Microsoft Jet Database Engine couldn't find the object "outToMSWord".
Any ideas?
I have a function called "outToWord" and another Function called "sendIt". Here is my code to "outToMSWord":
Function outToMSWord()
Dim x As String
x = "This is a test."
End Function
Here is my code to "sendIt"
Function sendIt()
DoCmd.OutputTo acOutputFunction, "outToMSWord", acFormatRTF, "C:\Documents and Settings\e3utbl\Desktop\FTPTest\Tasha.doc", -1
End Function
When I run that function I get a runtime error '3011': The Microsoft Jet Database Engine couldn't find the object "outToMSWord".
Any ideas?