Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2006

Tip: Looking for answers? Try searching our database.

Document Variables or Custom Document Propertes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jo - 21 Nov 2006 22:05 GMT
I am migrating a VBA Word Template (Office XP) tp a Word 2007 add-in.
I have used document variables extensively in the template.  Should I
continue using them with Office 2007 or would custom document
properties be better since I can get at them in the open xml format?

Are there any limitations on custom document properties that would
prevent me from switching from document variables to custom document
properties?

What are the pros & cons?
Jezebel - 21 Nov 2006 23:29 GMT
Document properties are accessible to the user through File > Properties.
Variables are accessible only via VBA. Whether that's a pro or a con depends
on what they are for.

Properties need slightly more code, too. With a variable you can use the
same code to add and to change the value; with a property, adding and
setting are different, and you also have to worry about data type. Eg, if
you add a property of type date and subsequently want to change the value,
you have to acknowledge the possibility that the user has displayed the
Properties dialog and changed the data type. (Not at all hard to deal with,
but the problem isn't there at all with variables.)

>I am migrating a VBA Word Template (Office XP) tp a Word 2007 add-in.
> I have used document variables extensively in the template.  Should I
[quoted text clipped - 6 lines]
>
> What are the pros & cons?
Peter Jamieson - 30 Nov 2006 19:48 GMT
> Are there any limitations on custom document properties that would
> prevent me from switching from document variables to custom document
> properties?

As far as I know strings in Document properties are limited to 255
characters, but document variables let you store around 65536 characters.

Peter Jamieson

>I am migrating a VBA Word Template (Office XP) tp a Word 2007 add-in.
> I have used document variables extensively in the template.  Should I
[quoted text clipped - 6 lines]
>
> What are the pros & cons?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.