Document Name Comparition

  • Thread starter E. Omar Troccoli K.
  • Start date
E

E. Omar Troccoli K.

En blancoHi,

I need a code that tell me the name of the document (generally Document1, Document2), get that name and compare with "Plantilla 2003+". If the name of the document is equal than "Plantilla 2003+" application will finish, if not you continue working. I'll put that code in Document.New and Document.Open place.

I've trying with code but can't find the righ code. Please, any help will be so much important for me.

Regards,


Omar
 
J

Jonathan West

En blancoHi Omar,

The ActiveDocument.Name property will give you the name of the current
document.

you can compare that with your filename. I would recommend that you convert
both to lowercase first, just in case the filename has the right letters in
the wrong case.

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com

Hi,

I need a code that tell me the name of the document (generally Document1,
Document2), get that name and compare with "Plantilla 2003+". If the name
of the document is equal than "Plantilla 2003+" application will finish, if
not you continue working. I'll put that code in Document.New and
Document.Open place.

I've trying with code but can't find the righ code. Please, any help will be
so much important for me.

Regards,


Omar
 

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