bdsermons
Member
- Outlook version
- Outlook 365 64 bit
- Email Account
- Exchange Server
I am creating an Outlook form where clients can submit a request to review documents that they can select by clicking on a command button (a picture of a file folder) which will open a file dialog box and let them choose the file they want to insert into the form.
I have created the macro for the CommandButton2_click but I am having trouble applying the code to the CommandButton in the Outlook form.
The Code that I am using is below.
I have created the macro for the CommandButton2_click but I am having trouble applying the code to the CommandButton in the Outlook form.
The Code that I am using is below.
Here is the code in VBA: (Name of the Macro is Attach1) Public Sub CommandButton2_Click() Dim XL As Object Dim strTest As String Set XL = CreateObject("Excel.Application") strTest = XL.GetOpenFilename() End Sub | Code behind form command button:(I know it needs to look something like this....)Sub CommandButton2_Click() Call macro-name() End Sub ---------------------------- Sub macro-name() ' not sure what should go here End Sub |