Using a Command Button to attach a file??

J

JuanManuel

Hi,
I'm brand new to outlook so I don't even know whether my question makes any
sense.

I barely figured out how to design a form and now I want to be able to
attach a file. The problem is that I don't want to use the default "Insert
File" button from the standard toolbar.

I want to use a separate command button that I placed towards the end of the
document. If possible, I would also like the file to be attached to a
specific region/field (I don't even know what to call it). The point is I
don't want the attachment to go to the "attach.." field that shows up, for
example, when you try to write a New Message and press the "Insert File"
button.

In summary I'd want to press a command button called "Attach a File" and
have a blank field next to it where the actual files get attached.

I have no idea how to do anything of the above, not even know whether it's
possible, any help is appreciated.

Thank you,

Juan
 
S

Sue Mosher [MVP-Outlook]

I would recommend that you stick with the attachment mechanism that users
already know how to use, rather than redesign the wheel. Outlook doesn't
support any concept of "a blank field next to it where the actual files get
attached." Attachments are either displayed in the attachment "well" in HTML
and plain text messages or inline in RTF messages.
 
J

JuanManuel

Sue,

Thank you for your response.

Knowing that "Attachments are either displayed in the attachment "well" in
HTML
and plain text messages or inline in RTF messages", Can I at least
accomplish the following:

Use a command button that acts exactly like the "Insert File" button (i.e.,
it displays a dialog box and attaches the selected file)?

Furthermore, if I want the file to be displayed in the attachment "well" do
I need additional code in the command button_click event handler?

Any code would be immensely appreciated

Thank you,

Juan
 
S

Sue Mosher [MVP-Outlook]

I guess I didn't make this clear enough: Where Outlook displays the
attachment depends entirely on the format of the message.

See http://www.outlookcode.com/d/tips/commandbarfun.htm for sample code to
display the Insert File dialog.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top