Brauche Hilfe bei Word 2002

Diskutiere Brauche Hilfe bei Word 2002 im Software Forum Forum im Bereich Hardware & Software Forum; Ich stehe vor einem mittelgrossen Problem ;) Ich soll in Vorgefertigten Dokumenten die Dokumentvariablen ändern. Nun genauer. Hab hier ein Word...
  • Brauche Hilfe bei Word 2002 Beitrag #1
Spacelord

Spacelord

Bekanntes Mitglied
Dabei seit
11.02.2003
Beiträge
389
Reaktionspunkte
0
Ort
Schwabenländle - wir können alles außer Hochdeutsc
Ich stehe vor einem mittelgrossen Problem ;)

Ich soll in Vorgefertigten Dokumenten die Dokumentvariablen ändern.
Nun genauer.
Hab hier ein Word 2002 Dokument vor mir, mit Variablen wie Autor, Titel, Bearbeiter etc. Diese Dokument wurde auch in die englische Sprache übersetzt um es dann englischsprachigen Kunden zu verfügung zu stellen. Jetzt ist natürlich notwendig, dass die Dokumentvariablen auch in englischer Sprache sind. D.h. ich soll (möglichst mit einem Makro oder einem Programm, da es über 50 verschiedene *.doc Dokumente sind) die Variablen Titel,Autor etc. ins englische, also in title, author, etc übersetzen. Gibts dafür vielleicht ein Programm? Ich hab leider im Internet nichts finden können. Daraufhin habe ich versucht das implemenitierte "Eintragungsmakro" umzuschreiben - leider funktioniert es nicht so wie ich es mir gewünscht habe. Es kommt einfach kein Ergebnis zustande :confused:

Hier mal der momentane Code:
------------------------------------------------------------------------


Private Sub Label16_Click()

End Sub
-------------------------------------------------------
Private Sub cmdengl_Click()
' löschen der variablen
ActiveDocument.Variables("title1").Delete


ActiveDocument.Variables.Add Name:="title1"
ActiveDocument.Variables("title1").Value = txtTitel1

' eintrage der Werte mit englischen Variablennamen

'ActiveDocument.Variables("title1").Value = txtTitel1
'ActiveDocument.Fields.Update
'ActiveDocument.Variables("title2").Value = txtTitel2
'ActiveDocument.Variables("status").Value = txtStatus
'ActiveDocument.Variables("company").Value = txtFirma
'ActiveDocument.Variables("organisation").Value = txtOrganisation
'ActiveDocument.Variables("unit").Value = txtUnit
'ActiveDocument.Variables("mailing_list").Value = txtVerteiler

' Combo-Box für Auswahl von Status
'ActiveDocument.Variables("status").Value = optStatus.SelText

' Fußzeile Bereich
'ActiveDocument.Variables("division").Value = txtBereich
'ActiveDocument.Variables("editor").Value = txtBearbeiter
'ActiveDocument.Variables("B_Releasename").Value = txtB_Freigabename
'ActiveDocument.Variables("B_Releasedate").Value = txtB_Freigabedatum

' Fußzeile Quality
'ActiveDocument.Variables("unit").Value = txtUnit
'ActiveDocument.Variables("author").Value = txtAutor
'ActiveDocument.Variables("Q_Releasename").Value = txtQ_Freigabename
'ActiveDocument.Variables("Q_Releasedate").Value = txtQ_Freigabedatum
'ActiveDocument.Variables("Q_File").Value = txtQ_Datei






update_doc

Unload Me


End Sub
-------------------------------------------------------
' Überarbeitung der Dateieigenschaften
' Autor: Norbert Windrich
' Datum: 27.06.2002

Private Sub UserForm_Initialize()

Call ClearMask

Call SetMask

End Sub
----------------------------------------------------------
' Löschen der Maske
Private Sub ClearMask()

With ActiveDocument
txtTitel1 = ""
txtTitel2 = ""
txtFirma = ""
txtOrganisation = ""
txtUnit = ""
txtVerteiler = ""

' Combo-Box für Auswahl von Status
optStatus.Clear
optStatus.AddItem ("DRAFT")
optStatus.AddItem ("FINAL DOCUMENT")

' Fußzeile Bereich
txtBereich = ""
txtBearbeiter = ""
txtB_Freigabename = ""
txtB_Freigabedatum = ""

' Fußzeile Quality
txtUnit = ""
txtAutor = ""
txtQ_Freigabename = ""
txtQ_Freigabedatum = ""
txtQ_Datei = ""

End With

End Sub
-----------------------------------------------------------
' Auslesen der Dokumenteigenschaften aus Word-Dokument und Setzen der Maske
Private Sub SetMask()

With ActiveDocument
txtTitel1 = .CustomDocumentProperties("Titel1").Value
txtTitel2 = .CustomDocumentProperties("Titel2").Value
txtFirma = .CustomDocumentProperties("Firma").Value
txtOrganisation = .CustomDocumentProperties("Organisation").Value
txtUnit = .CustomDocumentProperties("Unit").Value
txtVerteiler = .CustomDocumentProperties("Verteiler").Value

' Combo-Box für Auswahl von Status
Dok_Status = .CustomDocumentProperties("Status").Value
If Dok_Status = "DRAFT" Then
optStatus.Value = "DRAFT"
Else
optStatus.Value = "FINAL DOCUMENT"
End If

' Fußzeile Bereich
txtBereich = .CustomDocumentProperties("Bereich").Value
txtBearbeiter = .CustomDocumentProperties("Bearbeiter").Value
txtB_Freigabename = .CustomDocumentProperties("B_Freigabename").Value
txtB_Freigabedatum = .CustomDocumentProperties("B_Freigabedatum").Value

' Fußzeile Quality
txtUnit = .CustomDocumentProperties("Unit").Value
txtAutor = .CustomDocumentProperties("Autor").Value
txtQ_Freigabename = .CustomDocumentProperties("Q_Freigabename").Value
txtQ_Freigabedatum = .CustomDocumentProperties("Q_Freigabedatum").Value
txtQ_Datei = .CustomDocumentProperties("Q_Datei").Value

End With

End Sub
---------------------------------------------------------
' Lesen der Maske und Setzen der Dokumenteigenschaften im Word-Dokument
Private Sub ReadMask()

With ActiveDocument
.CustomDocumentProperties("Titel1").Value = txtTitel1
.CustomDocumentProperties("Titel2").Value = txtTitel2
.CustomDocumentProperties("Status").Value = txtStatus
.CustomDocumentProperties("Firma").Value = txtFirma
.CustomDocumentProperties("Organisation").Value = txtOrganisation
.CustomDocumentProperties("Unit").Value = txtUnit
.CustomDocumentProperties("Verteiler").Value = txtVerteiler

' Combo-Box für Auswahl von Status
.CustomDocumentProperties("Status").Value = optStatus.SelText

' Fußzeile Bereich
.CustomDocumentProperties("Bereich").Value = txtBereich
.CustomDocumentProperties("Bearbeiter").Value = txtBearbeiter
.CustomDocumentProperties("B_Freigabename").Value = txtB_Freigabename
.CustomDocumentProperties("B_Freigabedatum").Value = txtB_Freigabedatum

' Fußzeile Quality
.CustomDocumentProperties("Unit").Value = txtUnit
.CustomDocumentProperties("Autor").Value = txtAutor
.CustomDocumentProperties("Q_Freigabename").Value = txtQ_Freigabename
.CustomDocumentProperties("Q_Freigabedatum").Value = txtQ_Freigabedatum
.CustomDocumentProperties("Q_Datei").Value = txtQ_Datei

End With

End Sub
-------------------------------------------------------------
' Update der Felder im Dokument
Private Sub update_doc()

ActiveDocument.Fields.Update

Application.ScreenUpdating = False
ActiveDocument.Repaginate
For Each Teil In ActiveDocument.StoryRanges
Teil.Fields.Update
While Not (Teil.NextStoryRange Is Nothing)
Set Teil = Teil.NextStoryRange
Teil.Fields.Update
Wend
Next
Application.ScreenUpdating = True

End Sub
----------------------------------------------------------------
' Eintragen der Werte in das Dokument
Private Sub btnEintragen_Click()

Call ReadMask

update_doc

Unload Me

End Sub
------------------------------------------------------------------
' Beenden des Dialogs
Private Sub btnAbbrechen_Click()

Unload Me

End Sub

-------------------------------------------------------------------------

ich hoffe das der code ne hilfe ist :confused:

achja. was zu erwähnen wäre. ich habe die Datei bekommen, da war das Makro schon drin. Mein Selbstprogrammiertes ist nur die Funktion

Private Sub cmdengl_Click()

für den rest ist jemand anderes verantwortlich.

Ich hoffe ihr könnt mir helfen!
 
Thema:

Brauche Hilfe bei Word 2002

ANGEBOTE & SPONSOREN

https://www.mofapower.de/

Statistik des Forums

Themen
213.180
Beiträge
1.579.174
Mitglieder
55.879
Neuestes Mitglied
stonetreck
Oben