Hi Roger,
I think there's a bit of confusion here, caused by multiple meanings for the
word "variable".
In VBA, you can have variables that are just memory locations defined within
the macro. Each one should be declared in a Dim statement and given a
specific data type, for example
Dim CaseNumber As String
The expression ActiveDocument.Variables("CaseNumber") refers to something
else, a "document variable" that is stored in the document file. I don't
think that belongs in this macro at all.
Finally, you need to fill the variable CaseNumber by retreiving the contents
of the bookmark by that name. I think this is what you want (the
space-and-underscore is a continuation marker, meaning "this line and the
next one are part of the same statement"):
Dim CaseNumber As String
CaseNumber = _
ActiveDocument.Bookmarks("CaseNumber").Range.Text
Options.DefaultFilePath(wdDocumentPath) = _
"\\lv-abc\defaultpath\CaseDocs\" & CaseNumber
An alternative to this method is shown at
http://word.mvps.org/FAQs/MacrosVBA/ChangeSaveAsPath.htm.

Signature
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
> I'm trying to set a file path for the purpose of saving a Word Doc to
> the correct folder location. The entire path, except for the
[quoted text clipped - 18 lines]
>
> Thanks
Roger - 31 Mar 2005 23:52 GMT
Thanks Jay! I used the with dialogs code and it worked great.
Roger
> Hi Roger,
>
[quoted text clipped - 47 lines]
> >
> > Thanks