PDA

View Full Version : Emailing Question



junglej815
01-27-2008, 11:11 AM
Hello all any help would be appreciated. This is kind of similar to a previous question I had about ActiveX command button codes but kind of different so i wasn't sure if i should have posted this under that one or not, anyways...

I have a word document that is emailed to my companies Electrician and HVAC staff, it has an activeX command button on it that is used to open a new mail message with the document already attached and inserts the subject, and the send to address automatically. The VBA code for this procedure is currently applied to the form.

I was wondering if it's possible to modify the code so that when you click the command button it recognizes which group it should be mailed to based on what information is on the document and inserts the appropriate email address automatically.

For example the form has this:

Craft 420 Electrical
-When the command button is clicked it recognizes that " 420 Electrical " or even just " 420 " and inserts the Electricians email address.

Craft 430 HVAC
- When the command button is clicked it recognizes that " 430 HVAC " or even just " 430 " and inserts the HVAC email address.

You can see how it is on the attached form.

Thanks for any help with this, much appreciated.

junglej815
01-27-2008, 11:15 AM
grr..okay..not sure why i can't really get the attachements. its a locked form where " 420 Electrical " is typed into a Text Form Field ( the grey box )

fumei
01-28-2008, 01:55 AM
I am confused regarding the second post. "get the attachments"?????

"I was wondering if it's possible to modify the code so that when you click the command button it recognizes which group it should be mailed to based on what information is on the document and inserts the appropriate email address automatically."

Probably yes.

junglej815
01-28-2008, 05:46 AM
Sorry, that's all on me for not making any sense. I meant that i can't get attachements to post in my posts. I zipped the file and tried to attach it but it said that there was an error all the times i tried.

Hopefully it attaches now...