VBA to Save Email and set Custom Properties

Discussion in 'Microsoft Outlook VBA Programming' started by anasazii, Dec 22, 2016.

  1. anasazii

    anasazii

    Joined:
    Dec 22, 2016
    Likes Received:
    0
    I had a script that was working where from Outlook I saved my selected emails to a folder on my computer and then set some custom properties on the saved file (Comments, Author, Subject and Keywords to be exact).
    The script used the dsoFile.dll.

    I had to move to a new computer that is now Windows10, 64 bit, with Office 365 on it. My script no longer works.
    Is there any way to accomplish this without using the dsoFile.dll?
    The saving part still works, but I'd really like some way to set the custom properties as well.

    I've saved the dsoFile.dll on my system and have also downloaded and unzipped the 64 bit version.
    *
    When I try registering either one on new system it fails (Module was loaded but the call to DllRegisterServer failed with error code 0x80070005)

    Here is the gist of the code that is no longer working...If I try running as is the code fails at the first line, ActiveX Component can't create object.

    Set objFile = CreateObject("DSOFile.OleDocumentProperties")
    objFile.Open (sPath & sName)

    objFile.SummaryProperties.Subject = sSubject
    objFile.SummaryProperties.Author = sSenderName
    objFile.SummaryProperties.Comments = sCom
    objFile.SummaryProperties.Keywords = sKey
    objFile.Save

    Thanks for any suggestions and please try to be detailed as possible as I don't work with VBA all that often!
     
    anasazii, Dec 22, 2016
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rufus Williams

    VBA email based on custom date

    Rufus Williams, Sep 11, 2003, in forum: Microsoft Outlook VBA Programming
    Replies:
    0
    Views:
    563
    Rufus Williams
    Sep 11, 2003
  2. Guest

    Message properties (like file properties)

    Guest, Dec 1, 2003, in forum: Microsoft Outlook VBA Programming
    Replies:
    0
    Views:
    361
    Guest
    Dec 1, 2003
  3. Semut

    add properties tab to mailbox properties

    Semut, Oct 20, 2004, in forum: Microsoft Outlook VBA Programming
    Replies:
    2
    Views:
    353
    Semut
    Oct 22, 2004
  4. Steph

    MSG Custom properties on right click custom tab

    Steph, Feb 1, 2006, in forum: Microsoft Outlook VBA Programming
    Replies:
    1
    Views:
    392
    Dmitry Streblechenko
    Feb 1, 2006
  5. Dmitry Streblechenko

    Re: HTML Item properties vs. Regular item properties

    Dmitry Streblechenko, Dec 20, 2006, in forum: Microsoft Outlook VBA Programming
    Replies:
    5
    Views:
    424
    Dmitry Streblechenko
    Dec 22, 2006
  6. Guest

    custom action: save or delete email after sending

    Guest, May 2, 2007, in forum: Microsoft Outlook VBA Programming
    Replies:
    16
    Views:
    1,365
    Guest
    May 21, 2008
  7. ddumontier@hedinc.com

    Keeping custom properties when forwarding or replying to an email message.

    ddumontier@hedinc.com, May 30, 2007, in forum: Microsoft Outlook VBA Programming
    Replies:
    3
    Views:
    407
    ddumontier@hedinc.com
    Jun 4, 2007
  8. dkoester77

    VBA to populate custom field on custom form

    dkoester77, Mar 22, 2012, in forum: Microsoft Outlook VBA Programming
    Replies:
    0
    Views:
    1,240
    dkoester77
    Mar 22, 2012
Loading...