OpenOffice.org Part4 at SOFTWARE
[2ch|▼Menu]
359:名無しさん@お腹いっぱい。
07/03/17 17:12:49 0Lfx33irP
>>358 にあ!
Format(Now,"HHMMSS")は、あなたが望む文字列を返さないんだな。
msgbox関数の引数にして、確認してみればいいんだな。

色んな解があると思うけど、こんな感じでどう?
args1(0).Value設定とnowtime以外は、キーマクロそのままだよ。

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

dim args1(1) as new com.sun.star.beans.PropertyValue
nowtime=now()
args1(0).Name = "Name"
args1(0).Value = format(hour(nowtime),"00") & _
format(minute(nowtime),"00") & _
format(second(nowtime),"00")
args1(1).Name = "Index"
args1(1).Value = 1

dispatcher.executeDispatch(document, ".uno:Insert", "", 0, args1())
end sub


次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

5381日前に更新/224 KB
担当:undef