View Single Post
  #2   Report Post  
Jay Freedman
 
Posts: n/a
Default

On Mon, 9 May 2005 10:25:06 -0700, "Alvaro Cubero" Alvaro
wrote:

I defined a text-type custom value, and I need it to include sometimes
paragraphs and tabs, so that when I insert it in the text, it will
automatically adjust to the margins and tabulation stops definitions of the
fixed text. How do I insert those special characters? I've already tried
the obvious: ^p, ^t, or \p, \t or &p, &t with no success. Is it possible to
do what I need?


It's possible to enter a tab in a custom document property by typing a
tab character in the document, copying or cutting it to the clipboard,
and using Ctrl+V to paste it into the dialog. You can't do that with a
paragraph mark, though.

The only way I can see to enter the whole value you want is through
the VBA editor. You don't need a whole macro (although you could set
that up if you want). In the editor, display the Immediate window and
type something like this (all on one line):

ActiveDocument.CustomDocumentProperties("Test").Va lue="one" & vbTab &
"two" & vbCr & "three"

In this line, "Test" is the name of the custom property and must be in
quotes. The other words in quotes are the regular text in the value --
substitute what you need there. The vbTab and vbCr represent a tab and
a paragraph mark ("carriage return").

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ:
http://word.mvps.org