Quickly finding document location

S

Scott

In Word 04, is there some way to reveal the current document's location
(switching to Finder)?
 
J

JE McGimpsey

Scott said:
In Word 04, is there some way to reveal the current document's location
(switching to Finder)?

As with any OS X window, if you CMD-click on the window title, you'll
see a dropdown with the document path. You can select the folder from
the dropdown.

I also use a macro to toggle the full path in the window header:

Public Sub CaptionToggle()
Dim docMyDoc As Document
Set docMyDoc = ActiveDocument
With ActiveWindow
.Caption = Iif(.Caption = docMyDoc.FullName, _
docMyDoc.Name, docMyDoc.Fullname)
End With
End Sub
 
D

Daiya Mitchell

Actually, I think I was wanting a macro like that recently, but too lazy to
put any effort into asking about one. Thanks, JE.
 
J

John McGhie [MVP - Word and Word Macintosh]

Just to prove to you all that I was paying attention, I think John may have
had a keybounce in ".Caption = Iif(.Caption". I think that should be
".Caption = If(.Caption"

(Only one "I" in "if"...)

Cheers


Actually, I think I was wanting a macro like that recently, but too lazy to
put any effort into asking about one. Thanks, JE.

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 4 1209 1410
 
J

John McGhie [MVP - Word and Word Macintosh]

{Blush} Just to prove to you all that I don't know whatinhell I'm talking
about, I have NEVER seen the IIF function before in VBA :)

John, whereinhell did you find THAT one ??? Yeah, I know, in the VBA Help,
right? Awww shaddap!!!

* * * * *

IIf Function

Returns one of two parts, depending on the evaluation of an expression.
Syntax
IIf(expr, truepart, falsepart)
The IIf function syntax has these named arguments:
Part Description
expr Required. Expression you want to evaluate.
truepart Required. Value or expression returned if expr is True.
falsepart Required. Value or expression returned if expr is False.

Remarks
IIf always evaluates both truepart and falsepart, even though it returns
only one of them. Because of this, you should watch for undesirable side
effects. For example, if evaluating falsepart results in a division by zero
error, an error occurs even if expr is True.

* * * * *

The code is fine the way he typed it :)


Just to prove to you all that I was paying attention, I think John may have
had a keybounce in ".Caption = Iif(.Caption". I think that should be
".Caption = If(.Caption"

(Only one "I" in "if"...)

Cheers

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 4 1209 1410
 
J

JE McGimpsey

{Blush} Just to prove to you all that I don't know whatinhell I'm talking
about, I have NEVER seen the IIF function before in VBA :)

John, whereinhell did you find THAT one ??? Yeah, I know, in the VBA Help,
right? Awww shaddap!!!

Actually, Iif() is remarkably well buried in VBA Help. I can only find
links to it from the Switch() and Choose() methods.

I'm surprised it isn't in the See Also for Select Case and If...Then.
And it should at least be mentioned in the "Control Flow Keyword
Summary" topic

Of course it comes up if you search for it directly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top