Jump to content

Recommended Posts

Hi. I have almost no idea about Visual Basic (but I will have to learn a little bit for the following task, I think!):

 

I have an Excel spreadsheet with names and other information, let's say First Name, Last Name, Country and Height. What I want is to be able to run a Macro or something in Outlook's compose window and a prompt box should be displayed to the user. The user types in the name of a person (First name and Last name), preferably all in one, and then the spreadsheet is searched through and all the information for that person: their name, country and height - are inserted into the email, perhaps in a table.

The program would also need to check with the user if more than one person with that name is found, which one they want (eg. "Do you want the John Smith who lives in New York?", and if not, "Do you want the John Smith who lives in Texas?", etc.).

 

Does anyone know of anything like this, have any ideas how something like this could be programmed or have any other tips?

Thanks very much.  :)

Link to comment
https://forums.phpfreaks.com/topic/41843-visual-basic-lookup/
Share on other sites

  • 2 weeks later...

VB has good and simple access to COM interfaces, which are exposed by all of the MS office products. Get onto MSDN (http://msdn.microsoft.com), and look up the Document Object modelds for the various MS office documents. You can use the "CreateObject" call from VB to create/open one of these documents, than then read and/or manipulate it in various ways using the properties and methods exposed by these objects.

 

I definitely think MSND is the 1st place to start looking for this type of info.

 

Mick

Link to comment
https://forums.phpfreaks.com/topic/41843-visual-basic-lookup/#findComment-211914
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.