[Solved] Entering date and invoice number automatically in i
[Solved] Entering date and invoice number automatically in i
I have an invoice spreadsheet I want to use for printing invoices for my customers. Is there a way to have it enter the current date in a cell only when creating a new invoice? I want my invoices to show the date they were created, but I would prefer not to have to type the dates in manually. Also, is there a way to have an invoice number field automatically increment each time a new invoice is created? Would this have to be done with a macro?
Last edited by randtek on Wed Feb 18, 2015 4:24 pm, edited 1 time in total.
OpenOffice 4.1.1 on Windows 8.1
Re: Entering date and invoice number automatically in invoic
that is a very old OOo version. You need install a newer ApacheOpenoffice and/or LibreOffice version. (or refrech your signature if you have newer version.OpenOffice 3.1 on Windows 7 Home Premium
1.: You can use the 'NOW()' or 'TODAY()' function in the template of the invoice document. (the date will refresh, when you open the document in the future.Is there a way to have it enter the current date in a cell only when creating a new invoice? I want my invoices to show the date they were created, but I would prefer not to have to type the dates in manually.
2.: You can achieve this task by macro:
Code: Select all
Sub MyDate
Dim MyRange As Object
Dim Cell As Object
Myrange = ThisComponent.NamedRanges.getByName("Date_of_Invoice")
Cell = MyRange.ReferredCells.getCellByPosition(0,0)
Cell.setValue(DateValue(Now))
End sub
Last edited by Zizi64 on Wed Feb 18, 2015 2:49 pm, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Entering date and invoice number automatically in invoic
The main question is: where you want to store the number of the last crated invoice? In the template of the invoice? In a database? In a separated spreadsheet file?Also, is there a way to have an invoice number field automatically increment each time a new invoice is created?
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Entering date and invoice number automatically in invoic
Thank you for your quick and helpful reply. I will try that. Can the macro be set up to run automatically when the spreadsheet opens?
I am actually using Oo 4.1.1, and Windows 8.1. I have not been to this forum recently and did not think to update my profile. I will do that.
I am actually using Oo 4.1.1, and Windows 8.1. I have not been to this forum recently and did not think to update my profile. I will do that.
OpenOffice 4.1.1 on Windows 8.1
Re: Entering date and invoice number automatically in invoic
I think the template would be the best option. I am guessing I could do this in the same macro? Possibly like this:Zizi64 wrote:The main question is: where you want to store the number of the last crated invoice? In the template of the invoice? In a database? In a separated spreadsheet file?Also, is there a way to have an invoice number field automatically increment each time a new invoice is created?
1. Load template
2. Rename and Save to the appropriate name for my invoice file system
3. Insert date using code provided above
4. Increment invoice using number in Invoice field and adding 1
5. Update template file with current invoice number.
I think I know what to do for everything but #5 now. Can you help me (or point me to resources/tutorials) see how to update another spreadsheet?
OpenOffice 4.1.1 on Windows 8.1
Re: Entering date and invoice number automatically in invoic
Yes, it can. But the date will refresh, when you reopen an archived invoice.Can the macro be set up to run automatically when the spreadsheet opens?
If this is acceptable to you, then you need use the simpliest NOW() or TODAY() function without any macro...
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Entering date and invoice number automatically in invoic
I think, you need use an another order:I think the template would be the best option. I am guessing I could do this in the same macro? Possibly like this:
1. Load template
2. Rename and Save to the appropriate name for my invoice file system
3. Insert date using code provided above
4. Increment invoice using number in Invoice field and adding 1
5. Update template file with current invoice number.
I think I know what to do for everything but #5 now. Can you help me (or point me to resources/tutorials) see how to update another spreadsheet?
1. Load template
2. Increment invoice using number in Invoice field and adding 1
3. Update template file with current invoice number.
4. Insert date using code provided above
5. Rename and Save to the appropriate name for my invoice file system
There is no any "another spreadsheet". There is ONE template file. You can "resave" it after increment of the number, and then can "save as" actual invoice.
Use the "StoreAsURL..." and "StoreToURL..." API functions with the appropriate export filter. There are examples in this Forum, and in the Andrew Pitonyak's documents.
viewtopic.php?f=20&t=7280
https://wiki.openoffice.org/wiki/Docume ... od_Options
http://www.google.hu/url?sa=t&rct=j&q=& ... 0519,d.ZWU
But what about the "abort", "cancel", "decrement" options? (when not required the opened and resaved invoice? But the number was incremented ...)
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Entering date and invoice number automatically in invoic
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Entering date and invoice number automatically in invoice
Thank you for all of your assistance Tibor. You have answered my questions and given me the tools I needed to figure this out. I had not really considered the Cancel/Decrement issue. I will have to give that some thought. If you have suggestions about that, I would be interested to see them. If not, I will mark this post as [Solved].
OpenOffice 4.1.1 on Windows 8.1
Re: Entering date and invoice number automatically in invoic
I have many ideas an suggestions; the first is: maybe you need achieve this task based on a Database. (Sorry, I can not help you with the database management)If you have suggestions about that, I would be interested to see them. If not, I will mark this post as [Solved].
But it is not simple job to plan and realize such invoicing system. I can not devote as much time as is necessary...
And maybe(?) my knowldge is not enough for it.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
[SOLVED] Entering date and invoice number automatically in i
Understood! Thank you so much for the assistance you have already given. I have downloaded and looked at the sample you provided. The "Refresh Date" button did not seem to work for me, but I am not concerned about that. I want to figure out how you created that "Refresh Date" button, and implement it in my Invoice, but I will work on that on my own, and create a new post if I get stuck. I am going to start digging in to that Macro document from Andrew you provided. It looks like it will be a great tool for me in the future!
OpenOffice 4.1.1 on Windows 8.1
Re: [SOLVED] Entering date and invoice number automatically
The macro located in the document.The "Refresh Date" button did not seem to work for me,
You need set the macro security to 'Medium', and then you need enable the macros located in the document at the opening procedure
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.