Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Daten aus Access in Word Dokument

Empfohlene Antworten

Veröffentlicht

Hallo Gemeinde,

ich bin gerade auf der Suche nach möglichkeiten, wie ich Daten elegant aus einer Access Datenbank in ein Word Dokument bringe.

Meine Idee ist zum Beispiel, wenn ich ein Brief Schreibe, möchte ich einen entsprechenden Datensatz z.b. Adressdaten in den Kopf einfügen.

Dazu ist es wünschenswert nach Adressdaten vorab erst einmal zu suchen.

Mir geht es jetzt nicht um den code selber, sondern um die Möglichkeit, wie das gehen könnte? Ist VBA das richtige Werkzeug?

Bin für jeden Vorschlag dankbar.

Gruß

andy_mann

??

wie willst du das machen.

Du filterst im Access nach einem bestimmten Datensatz und drückst dann im Access nen Knöpfchen und daraufhin sind die Daten im Word?

Dazu gibt es im Word: Textanker (glaub die heissen so)

Die kann man aus andern Applikationen ansprechen.

Ja und vba is das richtige dafür.

Also Word Formular erstellen, Bookmarks dort setzen wo die Texte hinsollen, dann den code im Access ausführen. :)

Der code

Private Sub Kaltaquise_Click()

On Error GoTo Err_Kaltaquise_Click

Dim Word As Word.Application

Set Word = CreateObject("Word.Application")

With Word

.Visible = True

.Documents.Open "I:\Kundendienst\Betreiberdatenbank\Kaltaquise.dot "

.ActiveDocument.Bookmarks("ANSCHRIFT_NAME").Select

.Selection.Text = Me!o_name1

.ActiveDocument.Bookmarks("ANSCHRIFT_STRASSE").Sel ect

.Selection.Text = Me!o_strasse

.ActiveDocument.Bookmarks("ANSCHRIFT_PLZ").Select

.Selection.Text = Me!o_plz

.ActiveDocument.Bookmarks("ANSCHRIFT_ORT").Select

.Selection.Text = Me!o_ort

.ActiveDocument.Bookmarks("ANSCHRIFT_FAX").Select

.Selection.Text = Me!o_person1_fax

.ActiveDocument.Bookmarks("TUERANLAGE").Select

.Selection.Text = Me!typ1

.ActiveDocument.Bookmarks("ANSCHRIFT_PROJEKT").Sel ect

.Selection.Text = Me!projekt

.ActiveDocument.Bookmarks("BV_NAME").Select

.Selection.Text = Me!o_name1

.ActiveDocument.Bookmarks("BV_STRASSE").Select

.Selection.Text = Me!o_strasse

.ActiveDocument.Bookmarks("BV_PLZ").Select

.Selection.Text = Me!o_plz

.ActiveDocument.Bookmarks("BV_ORT").Select

.Selection.Text = Me!o_ort

.ActiveDocument.Bookmarks("USER").Select

.Selection.Text = Me!AktuellerBenutzer()


End With

Exit_Kaltaquise_Click:

Exit Sub

Err_Kaltaquise_Click:

MsgBox Err.Description

Resume Exit_Kaltaquise_Click

End Sub

  • Autor

Hallo,

vielen Dank für die schnelle Antwort.

Mein Gedanke ist halt, ob mann dies nicht Direkt aus dem Word erstellen kann.

So muß mann Acces öffnen und dort die aktion ausführen.

Gruß

andy_mann

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.