Sequentially numbering invoices

L

Lee

Hello

Following a kind reference on this group, I am adapting the code presented
in:
http://word.mvps.org/FAQs/MacrosVBA/NumberDocs.htm

I am embedding the macro into a template that will create invoices for our
small non-profit organisation to send out.

Now, I and my colleagues all work from our own homes and the request has
come up to consider the possibility of storing the Settings.txt file on the
web so that invoices could be generated by two or more people, for holiday
cover for instance.

Is there a way of building this in?

I imagine [hope?] that it is fairly easy to read the data from an http://
address but how would we update the file [via ftp perhaps?].

Many thanks for any advice.

Lee
 
W

Word Heretic

G'day "Lee" <[email protected]>,

the easiest way for your situation (0 budget, low skills) is to have
person 1 use the serial range 001000-001999, the next person to use
002000-002999 and so on. When its time for a change of thousands the
macro prompts them to manually email someone and get their next set,
which arrives with detailed instructions on where to save it ;-)

You need some server side scripting to return a unique number. Without
some extra work, it raises quality issues as well. Eg an unfriendly
can ping that address, say google crawling away, and now you have an
untrackable hole in your serials.



Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Lee reckoned:
 
M

Malcolm Smith

Lee

Do you have access to a web server somewhere which offers ASP? Because
what I do in some of my web applications which I have to update from the
desktop machine is to send to a hidden page a HTTP Request message with an
XML string.

The ASP page receives this request does what it needs to do, in this case
gets the next invoice number and then returns it back to the waiting
application which is waiting for a response.

You could have on the web server a small Access database for example and
then you could log who requested which invoice number (I expect you will
want some audit trailing).

It's rather easy to do and is actually quite fun to do. I do this sort of
thing on my major racing site, www.ukhorseracing.co.uk, to update the
results in the on-line database as well as on another site which is going
to get the same treatment today.

So, all you need is a web server which is running IIS rather than that
Unix thing and then you're well away.

- Malc
www.dragondrop.com
 
W

Word Heretic

G'day Father Mal,

mate, do you have something in your code to stop me (an unfriendly
external) from saying "oooo, look, a web addy that returns a unique
number, let's use it for my own purposes"


Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Malcolm Smith reckoned:
 
M

Malcolm Smith

Yes. Because the ASP code gets the XML which is passed to it and then
parses it looking for a certain node and then works on that node.

Which is why no-one has yet knackered my on-line racing database because
the right looking XML has to be given it. And since that the ASP is on a
properly configured site there is no way of seeing what is required.

It's basically a lock and key type thing.

You see, I'm not as daft as I look...

- Malc
www.dragondrop.com / www.ukhorseracing.co.uk
 
W

Word Heretic

G'day (e-mail address removed) (Malcolm Smith),

LOL. No, I was more just thinking extremely crazy thoughts like this:

Some kind ASP smart-ass, err geek, umm guru whatever (who may or may
not answer to Father Mal) could set up a URL that:

Accepts a Product Owner, Product Name and Identifier, (probably also
with a Validator) and checks for such against a small db before
spitting back a unique number.

This means if you get 1000 users like our poster (OP), with 4 user
forms each, its 4k * (say) 16+16+16+16 (64) bytes = 256k of raw data.
Stuff all, and OP gets an instant solution. Hell, maybe you could
provide said ASP to the MVP website (email me if necc) and it could be
hosted there.


Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Malcolm Smith reckoned:
 
M

Malcolm Smith

You mean running a web service for small businesses or individuals?

Hmm, easily done and I reckon that I could knock one up this weekend when
this current site is out of the way.

I have my own ASP host on a damn fine server in the UK so anything will go
there also for various reasons.

- Malc
www.dragondrop.com
 
L

Lee

Malcolm Smith said:
You mean running a web service for small businesses or individuals?

Hmm, easily done and I reckon that I could knock one up this weekend when
this current site is out of the way.

I have my own ASP host on a damn fine server in the UK so anything will go
there also for various reasons.

- Malc
www.dragondrop.com

Well. As the OP, I must say I like the sound of this.

Please keep us informed if you decide to do anything like this.

Ta
 
W

Word Heretic

G'day (e-mail address removed) (Malcolm Smith),

Yup. Of course, do some sort of gross stats on it so if some domain
starts abusing it you can charge, but wow, what a useful tool for this
sort of problem.

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Malcolm Smith reckoned:
 
M

Malcolm Smith

Lee,

Let me knock something up early next week and I will get back to you. In
the meantime I have to get some ASP code finished for my site otherwise my
subscribers are going to have a fit when it comes to the selections for
tomorrow's racing!

Cheers
Malc
 

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