macros and vba

Occasional Contributor

what is the problem?

AppActivate Replace(objWordDoc.Name, ".docx", "") & " - Word"

9 Replies

@polucar 

Check carefully what you see when you open the document manually.

I, for example, always display the extension of documents.

Furthermore, I see this if I open a document named Quicunx.docx stored locally:

 

S1676.png

on my other computer it works without problems, it doesn't work on this one, I'm trying to figure out why

@polucar 

Do you have a different version of Word on the two computers?

Are your documents saved locally on both computers?

yes, old 2016, new 365.
yes locally

@polucar 

If I remember correctly, Word 2016 displays "Document Name - Word" in the title bar.

Recent versions show "Document Name • Saved to this PC".

for example?

@polucar 

What is your question?

example, how should I change?

@polucar 

Try

 

AppActivate objWordDoc.Name