Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Embed xml file in doc (openXML archive) using vba

Posted on 2009-04-23
Medium Priority
Last Modified: 2012-05-06
I'm creating an addin for MS Word and i want to add/embed a file to the OXML structure
in the DocumentBeforeSave() event.
I don't know if it's possible to do such a thing from word!?

Sub DocumentBeforeSave()
  Doc.EmbedFile("c:\myfile.xml") ' If possible also specify where in archive to embed
End sub
Question by:dagi79
1 Comment
LVL 12

Accepted Solution

geneus earned 1500 total points
ID: 24215021
I think the following 2 links will give you the resources that you need:

Word Developer Portal

Manipulating Word 2007 Files with the Open XML Format API

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lost Word File? Eagerly, need it back? Read ahead; this File Recovery guide is for you.
I came across an unsolved Outlook issue and here is my solution.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question