PDA

View Full Version : Excel Outlook Vba



Svmaxcel
09-25-2017, 05:50 AM
I create reports and need to send it to users.
Sometimes it is 50 and sometimes its 300.
I am using Ms outlook 2007, its a Ms Exchange type.
If I want to send an email to ABC, I type ABC in outlook and press Ctrl k and outlook automatically finds his names and email address.
I cannot see there email address easily, I have to double click and check their info.
Even copy paste doesn't work.
Some times if there are 2 or more people with similar name, then I have to identify them by checking properties.

I want a VBA code to query Full Name or Emp id for several employess and get their email from Active Directory, it would be a super difficult thing to do.
Also if possible, can I get their Username, OU, Login/Logoff time, Computer Name, Reporting Manager, Department, Thanks in Advance

gmayor
09-25-2017, 08:11 PM
Wouldn't it be better to use mail merge? See http://www.gmayor.com/ManyToOne.htm and its one to one mode.

Svmaxcel
09-25-2017, 09:08 PM
Gmayor, excellent work here.
I will check and revert.
I also looked up the web for the issue and found something like this.
Check attachment.
Source https://www.remkoweijnen.nl/blog/2007/11/01/query-active-directory-from-excel/

Its written very well, but I was not able to make it work.
Maybe because I am a new bee to vb

Svmaxcel
09-29-2017, 10:04 PM
Wouldn't it be better to use mail merge? See http://www.gmayor.com/ManyToOne.htm and its one to one mode.

This didn't work.
Please help.

Svmaxcel
10-04-2017, 08:44 PM
I searched we and found good codes.
But it about ADO and I am not familiar with that.
Please help

mdmackillop
10-05-2017, 03:06 AM
You are abusing our forum looking for free solutions for your work (http://www.vbaexpress.com/forum/showthread.php?60928-Combo-box-Duplicates&p=370550&viewfull=1#post370550) and it appears you are out of your depth in what you are attempting. If you are looking to learn VBA then please post your code and we can assist.