
How to keep track on documents made?
Hi Gerrit
Quote:
> - convert the date to a string --> BUT HOW?
Format(date,"yymmdd")
Quote:
> - concatenate the initials to it --> with & I believe
If the username in Word is filled correctly (Tools - Options - Userdetails)
you could use the name that's stored there as a default. You can get it
with: Application.Username. Trick is now to separate first name or initials
and last name. Which version of Word are you using? Word 2000/XP is easier
then Word 97. In Word 2000/XP you can use the function Split to built an
array with the found elements.
In Word97 the trick is to separate the username based on points or spaces in
between the words you find in the username. Another option would be to ask
for the userdetails once and store it in the registry or an ini-file
Quote:
> - sequence ( nn , ie. first document of user bci is 01, second is 02,
etc.),
> of course per day, just to make it unique, assuming Bill won't write
more
> than 99
You can keep track of a counter in an ini file or in the registry. Make sure
people have write rights on this file if you use an ini. You can use the
method PrivateProfileString to write and read from an ini.
To see an example, visit this article on the MVP site which has code that
stores and reads a value for each new document:
"Creating sequentially numbered documents (such as invoices)"
http://www.mvps.org/word/FAQs/MacrosVBA/NumberDocs.htm
If you need more help, please post a reply to this message in the newsgroup
and add the relevant part of the code you've got so far. This way it's
easier for people out here to help you find an adequate solution.
Hope this helps,
Groeten,
Astrid
So that all can benefit from the discussion, please post all follow-ups to
the newsgroup.
Visit the MVP Word FAQ site at http://www.mvps.org/word/