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.

VBA - Daten von Access nach Word übergeben

Empfohlene Antworten

Hallo zusammen,

habe mich hier im Forum schon ein wenig informiert, habe aber leider keine Lösung für mein Problem gefunden. Ich soll aus Access 2003 mittels eines Formulares ein Word dokument öffnen. In diesem Formular habe ich einen "Button" eingefügt, der beim Click-Ereignis folgendes macht:

Private Sub Befehl49_Click()

Dim appWord As Object

On Error Resume Next

'Testen, ob Word aktiv ist

Set appWord = GetObject(, "Word.Application.8")

If Err.Number <> 0 Then

'Word ist nicht aktiv

Err.Clear

'Neue Word Instanz schaffen

Set appWord = CreateObject("Word.Application.8")

'Anzeigen

appWord.Documents.Add

appWord.Visible = True

Else

'Word aktivieren und Dokument öffnen

appWord.Activate

appWord.Documents.Open FileName:="Pfad zum Dokument"

appWord.Visible = True

appWord.bookmarks("FName") = Me.Ctl2_Vorname & Me.Ctl1_Nachname

End If

End Sub

An der fett markierten Stelle habe ich Probleme. Ich möchte an eine vorher definierte "Textmarke", in diesem Fall "FName" (Bookmark im Worddokument), den Inhalt von 2_Vorname und 1_Nachname geben, allerdings übergibt er die Inhalte nicht.

Um das zu realisieren, benötige ich eure Hilfe.

Wenn ihr eine Möglichkeit habt, die Daten an eine Textmarke oder an ein Formularfeld zu übergeben, immer her damit ;)

Gruß

easyflow

  • 4 Monate später...

Vielleicht liegt es am value.. probiers mal aus..

appWord.bookmarks("FName") = Me.Ctl2_Vorname.value & Me.Ctl1_Nachname.value

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

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.