Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use Access97 to populate,save and mail an Excel template

Status
Not open for further replies.

ruthcali

Programmer
Apr 27, 2000
470
US
i am using Office 97.

Could someone please give me the code to accomplish the following:

on an Access form, the user enters some data and then clicks a button called Email.

Then, an excel template opens and certain fields from the Access form are filled into the Excel template.

Then, the Excel template is named and saved with the name of a text box on the Access form.

Then, the Excel file (with its new name) becomes an attachment in Outlook and the TO: and SUBJECT: fields in Outlook are filled in.

Please help. i thought i had figured it out, but weird things keep happening. Such as:
--the newly named Excel file becomes hidden. In order to view it, (either before or after it was emailed), in Excel, you have to go to 'Window' 'Unhide',

--if the user curently had Excel open before clicking the button in Access, after sending off the Outlook email, they find that their workbook had closed without being prompted to save.

--One user has a template called 'Insert Visio Button.xls' that opens everytime he opens Excel. So, if he currently has an Excel spreadsheet open and then he clicks the 'Email' button in Access, he gets a message from Excel telling him: 'Insert Visio Button.xls' is in use by another user.' and Excel won't open.

HELP. i have spent hours on this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top