Let me start off by saying that I am a beginner self taught Visual Basic programmer. That being said here is what I am trying to do.
I have written a program that collect data from a user via text and list box input. It saves the data to the hard drive as a .doc document. Then when the user hits the send button it starts a mail session, addresses the email, outputs a title and body to the email, attaches the word document, and sends the email to the desired destination. I am making this program to give to prospective customers of mine so that they can enter certain information and send it to me easily.
Here is my problem. The application runs perfectly on my computer. It collects the data and sends it via email flawlessly. When I load it on someone elses computer and try to send the information I get an error message.
run-time error '339'
component 'msmapi32.ocx' or one of it's
dependencies not correctly registered:
a file is missing or invalid.
I am using the MAPISession and MAPIMessages controls to execute the create and send portion of my program and have determined based on my reading that is the problem.
This is the information that I have found on the MSDN Library :
If you attempt to run a program that uses the MAPI controls, make sure that you have the 32-bit MAPI DLLs installed properly or you may not be able to perform simple MAPI functions such as SignOn. For example, on Windows 95, you must install Mail during the operating system setup, or install it seperately from the control panel to correctly use MAPI functions or MAPI custom controls from Visual Basic.
So I assume this is the problem. Since I have Visual Studio 6.0 installed on my system it works fine, and since the computer I tried to run it on doesn't it didn't work and created the above error.
My question is can I create a sub program that will install the necessary file on any computer I run the program on automatically. Perhaps during form_load scan the system for the file and if it is not found install the file automatically. It is important that the program I am making does everything that is necessary to make it work automatically because if the potential customer has to manual alter his system in order to run the program I am afraid they
A. Won't run the program (or)
B. Not have the knowledge and/or ability to install the proper file first.
If someone could help me with the code, and where I can get the necessary MAPI DLL file to make this program work it would be greatly appreciated.
I have written a program that collect data from a user via text and list box input. It saves the data to the hard drive as a .doc document. Then when the user hits the send button it starts a mail session, addresses the email, outputs a title and body to the email, attaches the word document, and sends the email to the desired destination. I am making this program to give to prospective customers of mine so that they can enter certain information and send it to me easily.
Here is my problem. The application runs perfectly on my computer. It collects the data and sends it via email flawlessly. When I load it on someone elses computer and try to send the information I get an error message.
run-time error '339'
component 'msmapi32.ocx' or one of it's
dependencies not correctly registered:
a file is missing or invalid.
I am using the MAPISession and MAPIMessages controls to execute the create and send portion of my program and have determined based on my reading that is the problem.
This is the information that I have found on the MSDN Library :
If you attempt to run a program that uses the MAPI controls, make sure that you have the 32-bit MAPI DLLs installed properly or you may not be able to perform simple MAPI functions such as SignOn. For example, on Windows 95, you must install Mail during the operating system setup, or install it seperately from the control panel to correctly use MAPI functions or MAPI custom controls from Visual Basic.
So I assume this is the problem. Since I have Visual Studio 6.0 installed on my system it works fine, and since the computer I tried to run it on doesn't it didn't work and created the above error.
My question is can I create a sub program that will install the necessary file on any computer I run the program on automatically. Perhaps during form_load scan the system for the file and if it is not found install the file automatically. It is important that the program I am making does everything that is necessary to make it work automatically because if the potential customer has to manual alter his system in order to run the program I am afraid they
A. Won't run the program (or)
B. Not have the knowledge and/or ability to install the proper file first.
If someone could help me with the code, and where I can get the necessary MAPI DLL file to make this program work it would be greatly appreciated.