Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On 10/27/2012 01:29 PM, . wrote:
On 10/27/2012 01:06 PM, Tom Davies wrote:
Hi :)
Can you copy&paste the macro's code into a reply as text?  If we could see the code then some 
people here might be able to spot the error.
Good luck and regards from
Tom :)
Here's the code-

REM  *****  BASIC  *****

Sub Main

End Sub






sub Insert_Line_and_Date
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(1) as new com.sun.star.beans.PropertyValue
args1(0).Name = "GraphicName"
args1(0).Value = ""
args1(1).Name = "IsSimpleLine"
args1(1).Value = true

dispatcher.executeDispatch(document, ".uno:InsertGraphicRuler", "", 0,
args1())

rem ----------------------------------------------------------------------
dim args2(5) as new com.sun.star.beans.PropertyValue
args2(0).Name = "Type"
args2(0).Value = 0
args2(1).Name = "SubType"
args2(1).Value = 0
args2(2).Name = "Name"
args2(2).Value = ""
args2(3).Name = "Content"
args2(3).Value = "0"
args2(4).Name = "Format"
args2(4).Value = 5122
args2(5).Name = "Separator"
args2(5).Value = " "

dispatcher.executeDispatch(document, ".uno:InsertField", "", 0, args2())

rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "Text"
args3(0).Value = ", "

dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args3())

rem ----------------------------------------------------------------------
dim args4(1) as new com.sun.star.beans.PropertyValue
args4(0).Name = "Template"
args4(0).Value = "Heading 1"
args4(1).Name = "Family"
args4(1).Value = 2

dispatcher.executeDispatch(document, ".uno:StyleApply", "", 0, args4())


end sub






________________________________
From: . <Look@eBookRing.net>
To: users@global.libreoffice.org 
Sent: Saturday, 27 October 2012, 17:59
Subject: [libreoffice-users] Date changes to a 5 digit number

I made a macro that inserts the date (fixed) as (for example) "July 30,
2012,"

However, after running the macro a fews time the date then appears as
some 5 digit number.

How do I fix this date problem?

-- 
www.eBookRing.net

The designer and maker of the original eBookRing
The perfect stand for eReaders, iPads, iPhones, tablet computers and other electronic devices.

Patent Pending


-- 
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted







-- 
www.eBookRing.net

The designer and maker of the original eBookRing
The perfect stand for eReaders, iPads, iPhones, tablet computers and other electronic devices.

Patent Pending


-- 
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.