Numbering letters

G

Gilbert DE CEULAER

I have a folder ABC, with subfolders "01","02",...
These folders contain letters about subjects "01", "02",...
The filenames of these letters start with a number e.g. "01" contains a
letter "1385.ToMisterX.DealXYZ"
and folder "02" contains a letter "1386.ToMisterY.DealABC"

How do I create a button (Macro), that when pressed,
goes trough all the subfolders "01","02",...,
finds the highest number (in this case 1386),
adds 1,
and inserts the new (letter-)number (in this case 1387) ?

If you have the solution, that would be of great help to me. Tx in adevance.
Gilbert
 
D

Doug Robbins - Word MVP

I would suggest that you take a somewhat different approach to storing and
determining the next number to be used.

See the article "Creating sequentially numbered documents (such as
invoices)" at:

http://www.word.mvps.org/FAQs/MacrosVBA/NumberDocs.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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