Prev: Protect code only
Next: Office 2007+ .doxc format
From: Graham Mayor on 17 Mar 2010 03:08 That problem has long since been fixed. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<> "Gary Hillerson" <garyh(a)hillysun.net> wrote in message news:rcb0q593u1p97esmnfo3gsdlpm1vnte6c5(a)4ax.com... > If you're trying to save a Word 2007 doc with variables in it, you may > run into a problem that Microsoft introduced last spring in a security > update -- document variables can get corrupted when you save in .docx > format. > > The easy solution is to use document properties instead of variables. > They work pretty much the same way as variables, but seem to be more > reliable. Look at ActiveDocument.CustomDocumentProperties > > Gary > > > On Mon, 15 Mar 2010 12:13:33 +1000, "Doug Robbins - Word MVP" > <dkr(a)REMOVECAPSmvps.org> wrote: > >>With document variables, you do not need to use .Add >> >>Just use: >> >>ActiveDocument.Variables("docvarONE").Value = "varYELLOW" (or just >>varYELLOW if varYELLOW is declared somewhere else in your code and has >>something assigned to it) >> >>to add a variable docvarONE to the active document with the value of the >>variable being varYELLOW >> >>To change the value of the variable, just use >> >>ActiveDocument.Variables("docvarONE").Value = "Something else" |