konvertere dokumentskabelon fra MS til OO

Brugerhjælp og support til tekstbehandling i LibreOffice Writer

Moderators: Lodahl, Ejnar

Post Reply
Klaus H
Posts: 1
Joined: 23. Mar 2009 22:51

konvertere dokumentskabelon fra MS til OO

Post by Klaus H »

Hejsa.

Jeg har en .dot med VBA-kodning, med en indsat UserForm. (indsat nedenfor).
Virker som det skal i MSWord men ikke i OpenOffice.
Er der en der kan hjælpe mig videre?

Mvh

Klaus H

Private Sub CommandButtonUdfyld_Click()
Selection.EndKey Unit:=wdLine
Selection.Font.Name = "Arial"
Selection.Font.Size = 11
Selection.LanguageID = wdDanish
'Side 1
Selection.GoTo What:=wdGoToBookmark, Name:="K1"
Selection.TypeText Text:=frmKontrakt
Selection.GoTo What:=wdGoToBookmark, Name:="K2"
Selection.TypeText Text:=frmKontrakt
Selection.GoTo What:=wdGoToBookmark, Name:="L1"
Selection.TypeText Text:=frmNavn
Selection.GoTo What:=wdGoToBookmark, Name:="I1"
Selection.TypeText Text:=frmInst
Selection.GoTo What:=wdGoToBookmark, Name:="A1"
Selection.TypeText Text:=frmAnsvarlig
Selection.GoTo What:=wdGoToBookmark, Name:="Adr1"
Selection.TypeText Text:=frmAdresse
Selection.GoTo What:=wdGoToBookmark, Name:="Pnr1"
Selection.TypeText Text:=frmPnr
Selection.GoTo What:=wdGoToBookmark, Name:="By1"
Selection.TypeText Text:=frmBy
Selection.GoTo What:=wdGoToBookmark, Name:="Tlf1"
Selection.TypeText Text:=frmTelefon
Selection.GoTo What:=wdGoToBookmark, Name:="Ank1"
Selection.TypeText Text:=frmAnkomst
Selection.GoTo What:=wdGoToBookmark, Name:="Afr1"
Selection.TypeText Text:=frmAfrejse
Selection.GoTo What:=wdGoToBookmark, Name:="Dep1"
Selection.TypeText Text:=frmDepos & ",00"
Selection.GoTo What:=wdGoToBookmark, Name:="Deptid1"
Selection.TypeText Text:=frmDeposdato
Selection.GoTo What:=wdGoToBookmark, Name:="Dep3"
Selection.TypeText Text:=frmDepos & ",00"
Selection.GoTo What:=wdGoToBookmark, Name:="Deptid3"
Selection.TypeText Text:=frmDeposdato
Selection.GoTo What:=wdGoToBookmark, Name:="Dep4"
Selection.TypeText Text:=frmDepos & ",00"
Selection.GoTo What:=wdGoToBookmark, Name:="Rl1"
Selection.TypeText Text:=frmRestleje & ",00"
Selection.GoTo What:=wdGoToBookmark, Name:="Rltid1"
Selection.TypeText Text:=frmRestlejedato
Selection.GoTo What:=wdGoToBookmark, Name:="Samlet1"
Selection.TypeText Text:=frmSamlet & ",00"
Selection.GoTo What:=wdGoToBookmark, Name:="Dato1"
Selection.InsertDateTime DateTimeFormat:="dd.MM.yyyy", InsertAsField:=False
'side 2
Selection.GoTo What:=wdGoToBookmark, Name:="K3"
Selection.TypeText Text:=frmKontrakt
Selection.GoTo What:=wdGoToBookmark, Name:="K4"
Selection.TypeText Text:=frmKontrakt
Selection.GoTo What:=wdGoToBookmark, Name:="L2"
Selection.TypeText Text:=frmNavn
Selection.GoTo What:=wdGoToBookmark, Name:="I2"
Selection.TypeText Text:=frmInst
Selection.GoTo What:=wdGoToBookmark, Name:="A2"
Selection.TypeText Text:=frmAnsvarlig
Selection.GoTo What:=wdGoToBookmark, Name:="Adr2"
Selection.TypeText Text:=frmAdresse
Selection.GoTo What:=wdGoToBookmark, Name:="Pnr2"
Selection.TypeText Text:=frmPnr
Selection.GoTo What:=wdGoToBookmark, Name:="By2"
Selection.TypeText Text:=frmBy
Selection.GoTo What:=wdGoToBookmark, Name:="Tlf2"
Selection.TypeText Text:=frmTelefon
Selection.GoTo What:=wdGoToBookmark, Name:="Ank2"
Selection.TypeText Text:=frmAnkomst
Selection.GoTo What:=wdGoToBookmark, Name:="Afr2"
Selection.TypeText Text:=frmAfrejse
Selection.GoTo What:=wdGoToBookmark, Name:="Dep2"
Selection.TypeText Text:=frmDepos & ",00"
Selection.GoTo What:=wdGoToBookmark, Name:="Deptid2"
Selection.TypeText Text:=frmDeposdato
Selection.GoTo What:=wdGoToBookmark, Name:="Rl2"
Selection.TypeText Text:=frmRestleje & ",00"
Selection.GoTo What:=wdGoToBookmark, Name:="Rltid2"
Selection.TypeText Text:=frmRestlejedato
Selection.GoTo What:=wdGoToBookmark, Name:="Rl3"
Selection.TypeText Text:=frmRestleje & ",00"
Selection.GoTo What:=wdGoToBookmark, Name:="Rltid3"
Selection.TypeText Text:=frmRestlejedato
Selection.GoTo What:=wdGoToBookmark, Name:="Rl4"
Selection.TypeText Text:=frmRestleje & ",00"
Selection.GoTo What:=wdGoToBookmark, Name:="Samlet2"
Selection.TypeText Text:=frmSamlet & ",00"
Selection.GoTo What:=wdGoToBookmark, Name:="Dato2"
Selection.InsertDateTime DateTimeFormat:="dd.MM.yyyy", InsertAsField:=False
'Gem færdig fil
ActiveDocument.SaveAs FileName:="d:\Kontrakter\" & frmKontrakt
'Luk forklædet
Unload UserForm1
End Sub
Post Reply