Combo Box

Status
Not open for further replies.
once again i thank you so much.....i went back thru the "With ComboBox12" but forgot to change it to the number 12, as I had copied it from previous userform5 which had "With ComboBox11" so I changed to 12 and it works perfectly again.....your the best!!!
 
So this takes care of the userform6 error too?
 
hi....as I said before, everything is working perfectly!!

next question is as follows:

The macros we added to the contacts, which work when I open up a contact from the folder or simply highlight the contact, do not work when when I create a shorcut in a calendar appointment which is a shortcut to a contact that I have the appoinment with, and I click on the shortcut (and the contact of that person shows up normal), but the bullet points to the macros do not work.

I do have that Outlook 365 account for syncing thu computers, and don't know if that is the problem.

Any way to fix it?

Thanks much as usual!!
 
And as well, is there a way to create a keyboard shortcut to a macro?

So you now see my two next questions hopefuly!
 
If I understand the question, the contacts in the Contacts field are not exposed in the object model as 'normal' contacts so you can't run macros on them. If you are actually opening a contact, the macros should work.

The only shortcuts would be in the QAT.
 
Thanks much. The macros don't work when the contact is opened by the shortcut to the contact. Is there a way to fix that?
 
Here is what I posted to that other forum so you know the details as usual.

I have a set of macros that work perfectly, and I have set them up where they are listed on the Quick Access Toolbar of all Contacts, and when I open up a contact, I can click on the macro on the Quick Access Toolbar and it works.

The macros are bascially starting up certain email templates that automatially add the email address of the contact I open to the To Bar of the email.

The problem is as follows:

In creating a calendar event, you can insert a shortcut to a contact, so you can open up that contact in your system for whatever reason.

And when I click on the shortcut in the calendar, it opens up the exact contact i referree to, but those macros will not run.

Is there a way to fix this?

Thanks to all.
 
I will check on it - I'm out of town on a business trip so it might be a few days though.
 
In addition, when I receive an email, click on the email address in the From area, the contact of the person sending the email opens up (sometimes it doesn't), but when it does open up, the full contact is shown, but the macros don't work that show the combobox and command box which we created to show the list of email templates that automatially add the email address of the contact
 
I want to make this clear as to the issue. I think I might not have described it earlier in the best way. Please see below:

I have a set of macros that work perfectly, and I have set them up where they are listed on the Quick Access Toolbar of all Contacts, and when I open up a contact, I can click on the macro on the Quick Access Toolbar and it works.

Each macro bascially opens up a combobox with shows a list of email templates. I identify one of the areas in the list, and then when I click on the command button next to the combobox, it automatially creates an email based on the template and adds the email address of the specific contact I opened to the To Bar of the email.

The problem is as follows:

In creating a calendar event, you can insert a shortcut to a contact, so you can open up that contact in your system for whatever reason.

And when I click on the shortcut in the calendar, it opens up the exact contact i referree to, but those macros will not run.

Is there a way to fix this?

Thanks to all.


 
And in addition, when I open up the contact from the shortcut inside the calendar event, which shows the specific contact in the folder it is from, if I add a macro the same type of macro to it in the Quick Access Toolbar, the macro does not work. And if I go to Develper, and then Macros, and pick one of the macros that the same type of macro, it does not start up either when I click on run the macro from that area.

Now if I had added the macro the to contact after opening up the contact from the shortcut in the calendar appointment, and as I said the macro does not work, when I open up the contact directly from the folder, the macro that I added also works.

So for some reason, these macros do not work from the contact when I open the contact from the shortcut in the calendar event.
 
and finally, here is the userform creates the combobox and commandbutton macro.

Private Sub ComboBox1_Change()



End Sub

Private Sub ComboBox13_Change()



End Sub



Private Sub UserForm_Initialize()



With ComboBox13

.AddItem "addedname"

.AddItem "addedname"

End With

End Sub





Private Sub CommandButton10_Click()

lstNum7 =ComboBox13.ListIndex

Unload Me

End Sub



 
and here is the module form that connects witht the userform:

Public lstNum7 As Long

Public Sub Macro_Title()



Dim oMail As Outlook.MailItem

Dim oContact As Outlook.ContactItem



If TypeName(ActiveExplorer.Selection.Item(1)) = "ContactItem" Then

Set oContact = GetCurrentItem()



Dim strTemplate As String

UserForm7.Show



Select Case lstNum7

Case -1

strTemplate = ("C:\Users\UserName\AppData\Roaming\Microsoft\Templates\filename.oft")

Case 0

strTemplate = ("C:\Users\UserName\AppData\Roaming\Microsoft\Templates\filename.oft")

Case 1

strTemplate = ("C:\Users\UserName\AppData\Roaming\Microsoft\Templates\filename.oft")



End Select



Set oMail = Application.CreateItemFromTemplate(strTemplate)



With oMail

.To = oContact.Email1Address

.Display

End With

End If

Set oMail = Nothing



End Sub



Function GetCurrentItem() As Object

Dim objApp As Outlook.Application



Set objApp = Application

On Error Resume Next

Select Case TypeName(objApp.ActiveWindow)

Case "Explorer"

Set GetCurrentItem = objApp.ActiveExplorer.Selection.Item(1)

Case "Inspector"

Set GetCurrentItem = objApp.ActiveInspector.CurrentItem

End Select



Set objApp = Nothing

End Function

 
I'm just getting around to look at it - i had like 500 posts and comments to answer. :( Coming home from business trips is not fun at all. I'll want to test it - I asked some outlook programmers who know way more than I do and they said it wouldn't work because the inspector is not fired when items are opened certain ways but i want to test it to confirm. It's dumb if it doesn't - its a full contact so logic says it should work if the contact is open (selecting won't work for sure.)
 
thanks as usual.....any update today so I can work thru it?
 
I haven't had time to look at it yet, sorry.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
R List folders in a combo box + select folder + move emails from inbox to that folder + reply to that email Outlook VBA and Custom Forms 1
G Using Data From Combo Box in Appointment Body Outlook VBA and Custom Forms 6
P Custom Outlook form_Validations in combo box Outlook VBA and Custom Forms 0
S Outlook form - Combo box for deciding who to send form to Using Outlook 1
M details with the combo box Exchange Server Administration 3
Q Follow up: Make a combo box dependant on another Outlook VBA and Custom Forms 6
Q Make a combo box dependant on another Outlook VBA and Custom Forms 5
Q Load a recipient based on a value in a combo box Outlook VBA and Custom Forms 7
F Outlook 2010 - outlook userform and combo boxes Using Outlook 9
M Need help with combo boxes in messages! Using Outlook 10
M Outlook 2007 / Vista / Windows XP best combo needed BCM (Business Contact Manager) 2
P turn off the default "all day" check box in new calendar items. How? Using Outlook 1
S New Email "From" box stopped working Using Outlook 0
T Outlook 365 Search Box reverting to old location Using Outlook 2
J How do you disable address search box when typing @ in body of email? Using Outlook 0
L Is there a way to completely disable the "archive" box? Using Outlook 1
M Reverting The Outlook Search Box Location (or other undesired additions) Using Outlook 1
P outlook 2008 search box criteria couldn't be saved Using Outlook 2
Terry Sullivan E-Mails Sent Using a Group Box Result in 70 Kickbacks Using Outlook 4
N Private check box in table view Using Outlook 0
Commodore Folders always closed in move/copy items dialog box Using Outlook 3
P IMAP Folders Dialog Box Using Outlook 1
C Custom Outlook Form - Populate Information from Radio Button / Check Box Using Outlook 0
J Program Checkbox that will activate a text box in a Outlook fallible form. Outlook VBA and Custom Forms 1
CWM030 Call me old if you want. OL 2016 font size out of the box. Using Outlook 3
P Suppress dialog box on email check error? Using Outlook 5
E Don't want Inbox shown when login box is shown Using Outlook 1
stephen li VBA Outlook send mail automatically by specified outlook mail box Outlook VBA and Custom Forms 1
A GetSelectNamesDialog Pre-fill search box Outlook VBA and Custom Forms 12
P Outlook 2010 sending safe senders email to junk box Using Outlook 8
K Sharedmail box Outlook VBA and Custom Forms 4
Diane Poremsky Outlook Suggestion Box at Uservoice Using Outlook 0
D Emails do not appear in Sent box! Using Outlook 4
T OL2010 Password box keeps appearing. Using Outlook 6
A From box in custom outlook Form Outlook VBA and Custom Forms 0
Kristine RS box added in Favorites disappears Using Outlook 6
L An () has been inserted after the address in an address box; how do I remove them. Using Outlook 1
rohit I want to Populate Popup box while sending any email with attachment. Outlook VBA and Custom Forms 4
rohit I want to Populate Popup box while sending any email with attachment Using Outlook 1
moron save as & file location dialog box popup Outlook VBA and Custom Forms 2
Ross Garvey Dialogue box opens as I exit Using Outlook 2
P BCM 2013 Contacts Form Drop Down Box Bug BCM (Business Contact Manager) 1
C Outlook 2013 - Email Gets Sent - But Does Not Move From Outbox to Sent Box Using Outlook 4
G Enter Network Password box pops up every few seconds Using Outlook 2
V In Box Issues Using Outlook 1
S 2010 outlook today looks like an empty email box Using Outlook 4
S Custom yes/no message box. Using Outlook 0
L Auto-set followup/reminder popup box for ALL sent emails. Using Outlook 0
P VBA for Dialog Box when sending Email Using Outlook 8
V Clicking box to delete junk mail doesn't stay Using Outlook 2

Similar threads

Back
Top