none
Outlook 2007 macro to work with database RRS feed

  • Question

  • Hello,

    I'm developing an email logging system for a department using access 2007. Is there a macro for when the user opens the email, a button can be pressed inside of outlook which then transfers the key parts of the email, such as email address, subject and body over into the GUI of the database? Thus then removing the need for the user to copy and paste all the time.

    Thanks in advance for your help.


    • Edited by ASM2792 Tuesday, June 10, 2014 11:11 AM
    Tuesday, June 10, 2014 10:59 AM

Answers

  • You are right it would be used on a variable amount of machines as the email team grows. I understand that i need to use the COM add-ins which i will develop as a bonus addin. Would it be a case of using shell commands to open the database front end i.e Firefox and then copying the data across as and where its required? 

    For example, the senders email address in the customer email field, body of the email in the received content field. etc etc? 

    • Marked as answer by ASM2792 Wednesday, June 11, 2014 1:55 PM
    Tuesday, June 10, 2014 9:00 PM

All replies

  • Hello,

    No, there is no such ready-made macro. It looks like you need to automate Access for adding new records based on the opened email. You may find the following articles helpful:

    How To Automate Microsoft Access From Visual Basic .NET

    How to automate Microsoft Access by using Visual C#

    On the opposite side you can automate Outlook from Access for gathering the required information without user's interaction. See Automating Outlook from Other Office Applications for more information.

    Finally, if you plan to deploy the solution to multiple PCs I'd recommend developing an Outlook add-in instead. VBA macros are not designed for distributing on multiple PCs. That's exactly what COM add-ins were designed for. You can find a lot of walkthroughs in MSDN - see Outlook Solutions .



    Tuesday, June 10, 2014 12:08 PM
  • You are right it would be used on a variable amount of machines as the email team grows. I understand that i need to use the COM add-ins which i will develop as a bonus addin. Would it be a case of using shell commands to open the database front end i.e Firefox and then copying the data across as and where its required? 

    For example, the senders email address in the customer email field, body of the email in the received content field. etc etc? 

    • Marked as answer by ASM2792 Wednesday, June 11, 2014 1:55 PM
    Tuesday, June 10, 2014 9:00 PM
  • > Would it be a case of using shell commands to open the database front end i.e Firefox and then copying the data across as and where its required? 

    Sorry, but I don't quite understand your question. Could you please be more specific?

    Wednesday, June 11, 2014 11:28 AM
  • If i were to US Visual Basic to code a COM Addin. Would I just need to use a shell command to open the GUI front end i have designed, then use more vb code to transfer the information i require from outlook to the GUI?

    I hope that make a little more sense.

    Wednesday, June 11, 2014 11:57 AM
  • Yep.

    Be aware, you need to have Visual Studio installed to develop an add-in. See the Outlook Solutions section in MSDN for more information.


    Wednesday, June 11, 2014 12:21 PM
  • Much obliged and thanks for your help :)
    Wednesday, June 11, 2014 1:56 PM