Email faxing

pouliotg

New Member
Joined
Nov 28, 2004
Messages
34
I would like to create a form that people could enter two pieces of information. Cell A1 would be Contact Name, Cell A2 would be the Phone #.

Once they have type in this information I need that link in the following order.


[NAFAX:Contact Name@/FN=8,15551234567,,43001]

I would like to have a button in excel once it's click it would start MS Outlook and it would copy the above string in the To: field.

Thanks
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

timorrill

Well-known Member
Joined
Sep 20, 2006
Messages
528
Hi pouliotg,

First, a few assumptions:

(1) You know how to or can find help on setting up the UserForm.
(2) The UserForm has two text boxes, named txtName and txtNumber (corresponding to the Contact Name and Phone #)
(3) The UserForm has a button called cmdNewMsg.
(4) You have selected "Microsoft Office Outlook 11.0 Object Library" in the Tools -> References dialog of the Visual Basic Editor. Note that 11.0 corresponds with Microsoft Outlook 2003; 10.0 with Outlook 2002, etc.
(5) You are able to create and link appropriate buttons in the worksheet to show the UserForm.

Here's the vital code:

Code:
Private Sub cmdNewMsg_Click()
    Dim objOL As New Outlook.Application
    Dim objMsg As Outlook.MailItem
    
    Set objOL = New Outlook.Application
    Set objMsg = objOL.CreateItem(olMailItem)
    
    With objMsg
        .To = "[NAFAX:" & txtName.Text & "@/FN=8,1" & txtNumber.Text & ",,43001]"
        .Display
    End With
    
    Set objMsg = Nothing
    Set objOL = Nothing
End Sub

Let me know if you need further assistance.
 

Forum statistics

Threads
1,136,878
Messages
5,678,312
Members
419,754
Latest member
LordEddard

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top