Group:  Microsoft Word ยป microsoft.public.word.formatting.longdocs
Thread: Modify feilds

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Modify feilds
"WAYNEL" <home[ at ]wlawson.co.uk> 27.09.2006 11:13:47
How can I mondify the FileName feild so that it just gives me the
filename without the extention, with sa Left(FileName,8).

WayneL

Re: Modify feilds
"Robert M. Franz (RMF)" <robert.franz[ at ]mvps.org> 27.09.2006 11:33:13
Hi Waynel

WAYNEL wrote:
[Quoted Text]
> How can I mondify the FileName feild so that it just gives me the
> filename without the extention, with sa Left(FileName,8).

In short: you don't.

You can change the way Windows itself displays filenames (w/o the
extension), but this is generally not a good idea.

But there's no field switch doing what you ask for (and God knows we've
asked for such things repeatedly :-)).

You could programmatically (on saving?) insert the filename into a
Document variable or property and reference this instead.

HTH
Robert
--
/"\ ASCII Ribbon Campaign | MS
\ / | MVP
X Against HTML | for
/ \ in e-mail & news | Word
Re: Modify feilds
"WAYNEL" <home[ at ]wlawson.co.uk> 27.09.2006 11:44:44
Hi Robert


Is there someway of using VBA say NoExt = FileName, then say insert
that into a feild?

WayneL

Robert M. Franz (RMF) wrote:
[Quoted Text]
> Hi Waynel
>
> WAYNEL wrote:
> > How can I mondify the FileName feild so that it just gives me the
> > filename without the extention, with sa Left(FileName,8).
>
> In short: you don't.
>
> You can change the way Windows itself displays filenames (w/o the
> extension), but this is generally not a good idea.
>
> But there's no field switch doing what you ask for (and God knows we've
> asked for such things repeatedly :-)).
>
> You could programmatically (on saving?) insert the filename into a
> Document variable or property and reference this instead.
>
> HTH
> Robert
> --
> /"\ ASCII Ribbon Campaign | MS
> \ / | MVP
> X Against HTML | for
> / \ in e-mail & news | Word

Re: Modify feilds
"Robert M. Franz (RMF)" <robert.franz[ at ]mvps.org> 27.09.2006 12:18:44
WAYNEL wrote:
[Quoted Text]
> Is there someway of using VBA say NoExt = FileName, then say insert
> that into a feild?

You can do almost anything in VBA, like define your own macro which
inserts the filename to your liking at the insertion point. But I don't
know of anything you can do to actually change the output of a FILENAME
field in the way you want it.

[BTW, even if you _had_ the possibility to use simple string
manipulation on the field itself, not every document name consists of
8+3 ...]

Greetinx
Robert
--
/"\ ASCII Ribbon Campaign | MS
\ / | MVP
X Against HTML | for
/ \ in e-mail & news | Word

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net