Reply
 
Thread Tools Display Modes
  #1   Report Post  
Nick Child
 
Posts: n/a
Default Custom Properties for None WORD documents

Hi

For my application I have created a new document extension called .HST.
This extension is assocaited with WORD. For normal word and TXt documents I
am adding Custom Properties automatically using CustomDocumentProperties.Add

This works fine. However as part of my application I store all sorts of
documents types as .HST files. These include .MSG's and JPEG's etc. To these
I cannot add Custom Properties. I open the .HST files using somthing like
xDoc = xAppocuments:Open ( P-FILE-NAME ) anf then add the properties. I
know this works because I can message them out immeadiately. However when I
try to SAVE the document using xAppocuments:Save() I get errors because
the contents of the .HST file are effectively .MSG or .JPEG etc and WORD
wants to convert them. If i was to open the document in WORD manually and
press save I would get the same problem.

If I right click on the .HST I can add CUSTOM Properties manually so why can
I not do it automatically.

Is there an API I need to call to add custom propeties rather than opening
them as a WORD object. Or is there a way I can save the documents without
getting the errors.



--
Many Thanks
Nick
  #2   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?B?TmljayBDaGlsZA==?=,

There are internal properties (Office custom properties), and then there are
properties available through the Windows environment. That's most likely what
you're seeing when you right-click a file. The Office properties are designed to
be accessible in this manner, as well. MS supplies a tool named DSOFile(.exe)
that VB programmers can use to read and write these properties for Office files.

I believe DSOFile is a wrapper for something in the API, but I couldn't tell you
what. If your programming language is VB, then I'd start in a classic VB
newsgroup. If it's C++, then head to a group for that, and maybe search MSDN.

For my application I have created a new document extension called .HST.
This extension is assocaited with WORD. For normal word and TXt documents I
am adding Custom Properties automatically using CustomDocumentProperties.Add

This works fine. However as part of my application I store all sorts of
documents types as .HST files. These include .MSG's and JPEG's etc. To these
I cannot add Custom Properties. I open the .HST files using somthing like
xDoc = xAppocuments:Open ( P-FILE-NAME ) anf then add the properties. I
know this works because I can message them out immeadiately. However when I
try to SAVE the document using xAppocuments:Save() I get errors because
the contents of the .HST file are effectively .MSG or .JPEG etc and WORD
wants to convert them. If i was to open the document in WORD manually and
press save I would get the same problem.

If I right click on the .HST I can add CUSTOM Properties manually so why can
I not do it automatically.

Is there an API I need to call to add custom propeties rather than opening
them as a WORD object. Or is there a way I can save the documents without
getting the errors.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does Word have Keyboard Merges like Word Perfect does? Donnas Mailmerge 1 June 28th 05 09:30 PM
Word2000 letterhead merge BAW Mailmerge 3 June 25th 05 01:17 PM
is word perfect compatible with office word? Noreen Microsoft Word Help 1 May 11th 05 11:17 PM
letters - ask/fillin Caroline H New Users 2 February 25th 05 08:19 PM
word xp crashes after macros are recorded kharris0405 Microsoft Word Help 3 January 11th 05 10:50 PM


All times are GMT +1. The time now is 10:40 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"