none
Outlook: How to Add a Building Block (e.g. quick part) programmatically RRS feed

  • Question

  • Hello,

    how can i add building blocks (e.g. quick parts) programmatically to the existing building block collection.

    reason: i want to share several building blocks for everyone in the network

    in word, you can share building blocks automatically, but in outlook, you can only choose the local "NormalEmail.dotm" and no other files

    in outlook, you cant share building blocks by default

    so, is there a chance to share the building blocks programmatically?

    Friday, March 1, 2013 6:07 AM

All replies

  • Even if Outlook has a slightly different implementation of using Building Blocks in Word, you'd still need to use the Word Object Model to program with them.  All Outlook can do is give you the Word.Document object for an email.

    Eric Legault MVP (Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    Friday, March 1, 2013 7:55 PM
    Moderator
  • yes, thats true;

    but iv tried to get the word document (of the inspector) in outlook with the word object model;

    this works fine, but the document is read only during the load of the inspector;

    iv tried to merge an other word file with the included building blocks to the word document of the inspector but again: read only

    is there a chance to share building blocks in outlook or not?

    Tuesday, March 5, 2013 6:49 AM
  • If you want to edit an existing message, you have to invoke edit mode for the item.  AFAIK, the only way to do this is to execute the associated CommandBarButton or Ribbon control for the Edit Message action.

    http://www.outlookcode.com/threads.aspx?forumid=3&messageid=31310


    Eric Legault MVP (Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    Tuesday, March 5, 2013 4:03 PM
    Moderator
  • If you want to edit an existing message, you have to invoke edit mode for the item.  AFAIK, the only way to do this is to execute the associated CommandBarButton or Ribbon control for the Edit Message action.

    http://www.outlookcode.com/threads.aspx?forumid=3&messageid=31310


    Eric Legault MVP (Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    ok ty;

    i need a way to share the building blocks in outlook; so i thought, merging the inspector word document with an other word document can do the trick to release the building blocks in the inspector word document;

    thats why i tried to edit the document;

    so at all: there is no way to share building blocks in outlook like you can do this in word?

    Thursday, March 7, 2013 6:43 AM
  • I'm not sure what you mean by sharing the Building Blocks.  Key thing to know: the Building Blocks you save or access in Outlook come from the %appdata%/Microsoft/Templates/NormalEmail.dotm file.  In Word itself, they're stored in Normal.dotm.  So there's two different buckets of Building Blocks.  If you want to work with these files somehow for your purposes, then use an API of your choice.  Otherwise, you have to use the Word Object Model to manage them - not the Outlook Object Model.

    Eric Legault MVP (Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    • Marked as answer by chrisshizzle2 Monday, March 11, 2013 6:10 AM
    • Unmarked as answer by chrisshizzle2 Monday, March 11, 2013 6:10 AM
    Thursday, March 7, 2013 4:58 PM
    Moderator
  • with sharing building blocks i mean:

    accessing building blocks from other users stored on network;

    you can do this in word by default, but you cant in outlook;

    as i wrote: i know, that i need to access normalemail.dotm in outlook and i know that there are two types of building blocks for word and outlook;

    i also said, that iv used the api (word and outlook object model) but without success.

    but it seems, there is no chance to share building blocks in outlook programmatically....

    Monday, March 11, 2013 6:15 AM