On Sat, 23 Jul 2005 20:32:29 -0400, Mangus Pyke <(E-Mail Removed)>
wrote in microsoft.public.outlook.program_vba:
>I'm send an identical email with a different attachment to eight
>groups of team managers on a monthly basis. The subject line changes
>each month (to include the appropriate month) and the recipients
>differ in each email. To simplify my life, I made a macro for each
>client that looks like this:
[snip]
>The only thing left that I want to do is spawn a dialog box to add the
>file attachment that goes with the email, but I've had no luck in
>figuring out that part. I'm used to the object model for Excel, but
>I'm completely out of my element with Outlook.
>
>Any suggestions?
If the macro knows the location of the attachment:
myItem.Attachments.Add(Source, Type, Position, DisplayName)
or by executing the menu item:
ActiveInspector.CommandBars("Menu Bar").Controls("Insert").CommandBar.Controls("&File...").Execute
or shorter (and presumably language independent):
ActiveInspector.CommandBars.FindControl(,1079).Execute
See also: <http://www.outlookcode.com/d/tips/commandbarfun.htm>.
--
Michael Bednarek
http://mbednarek.com/ "POST NO BILLS"