WDK: Invoice3 Template Causes WordBasic Error 134 |
Q145323
When you create a new document with the Invoice3.dot template from the Word Developers Kit (third edition), the following error message appears:
WordBasic ERR=134
An argument to a function contained an illegal date or time.
This problem occurs if you use a system date of December.
To work around this problem, use the following steps:
WARNING: ANY USE BY YOU OF THE OR MACRO CODE PROVIDED IN THIS ARTICLE IS AT
YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty
of any kind, either express or implied, including but not limited to the
implied warranties of merchantability and/or fitness for a particular
purpose.
If Month(Today()) <> 12 Then SetFormResult "ShipDate",
Date$(DateSerial(Year(Today()), Month(Today()) + 1, Day(Today())))
Else
SetFormResult "ShipDate", Date$(DateSerial(Year(Today()) + 1,
Month(Today()) + 1, Day(Today())))
End If
Change the code to read as follows:
If Month(Today()) <> 12 Then SetFormResult "ShipDate",
Date$(DateSerial(Year(Today()), Month(Today()) + 1, Day(Today())))
Else
SetFormResult "ShipDate", Date$(DateSerial(Year(Today()) + 1,
1, Day(Today())))
End If Microsoft has confirmed this to be a problem in the products listed at the beginning of this article. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
"Microsoft Word Developers Kit," third edition, Appendix B, pages 969-1001
Additional query words:
Keywords :
Issue type :
Technology :
|
Last Reviewed: November 8, 2000 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |