Deleting CustomDocumentProperties within Word from VB .Net
Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance
I've hunted low and high for this and I've tried just about everything I
could find on the www. I have a template document (.dot) that thru a VB .Net
I open and fill with information. I trap the DocumentBeforeSave event so
that I can force the file to be saved to a particular location and I cancel
the SaveAsUI window. But my problem is that the .dot file gets prepopulated
with data from an XML document that I have (which is okay so far) but when I
open the .doc file that was created from the .dot template I get a message
stating the XML can not be found. I don't want the .doc looking for the XML
document becuase that was only used for loading the data into the template.
So I checked the documents properties and I notice that it has 2 custom
properties both listing the XML document. If I manually delete these
properties then subsequent opens of the .doc work fine. So how do I thru VB
..Net before saving the .dot has a .doc delete the properties?
--
Thanks
Ken Beard
MCSD, MCP
.
Relevant Pages
- Re: Sharepoint and templates: do they get along?
... My guess is that this has nothing to do with Sharepoint, ... The result of this is that she was getting a .dot document, ... template documents to the sharepoint site for our authors to access. ... as read only .doc files - such that when an author opens the file, ... (microsoft.public.word.docmanagement) - Re: Mailmerge template
... (attaching one to the template is slightly less of a problem in Word 2000 ... The .dot file is currently ... suggest that if things are not working, she opens the /template/ (not a ... changed the page setup margins on my machine and saved it as a .dot file, ... (microsoft.public.word.mailmerge.fields) - Re: word 2003 template has been written over. How?
... Teach them not to open a .dot file. ... Tech Editor for "Microsoft Publisher 2007 For Dummies" ... He opens word, then clicks recent documents on the right ... template it is listed there. ... (microsoft.public.word.docmanagement) - Re: Mailmerge template
... (attaching one to the template is slightly less of a problem in Word 2000 ... The .dot file is currently ... You also said that "if things are not working, she opens the /template/ ... changed the page setup margins on my machine and saved it as a .dot ... (microsoft.public.word.mailmerge.fields) - Re: "new document" opens a previous one
... but you have deleted the wrong template. ... Due to a bug in Word 2004, the Normal template does not have a .dot ... what actually opens is a letter I ... McGhie Information Engineering Pty Ltdhttp://jgmcghie.fastmail.com.au/ ... (microsoft.public.mac.office.word) |
|