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.

Problem beim VB-gesteuertem Einfügen einer Tabelle in Word 2010

Empfohlene Antworten

Veröffentlicht

Ich habe ein Visual-Basic-Projekt (noch VB 6), das unter Windows XP und Vista sowie Microsoft Office 2003 problemlos funktioniert. Nun bin ich auf Windows 7 und Office 2010 umgestiegen. Seither gibt es ein Problem beim vb-gesteuerten Einfügen einer Tabelle in ein Word-Dokument: die Tabelle wird nicht eingefügt und mit Text gefüllt.

Hier die ersten betreffenden Befehlszeilen:

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

Set oTable = ActiveDocument.Tables.Add(NumRows:=r, NumColumns:=2, Range:=Selection.Range)

' Tabelleigenschaften festlegen

With oTable

.PreferredWidthType = wdPreferredWidthPoints

.PreferredWidth = CentimetersToPoints(16.4) ' Breite der Tabelle

.LeftPadding = CentimetersToPoints(0.19) ' Texteinzug

.RightPadding = CentimetersToPoints(0.19)

.Spacing = 0 ' Abstand davor

.AllowPageBreaks = False

.AllowAutoFit = False

.Rows.LeftIndent = CentimetersToPoints(0) ' linker Einzug

.Rows.Alignment = wdAlignRowLeft

.Rows.HeightRule = wdRowHeightAtLeast 'wdRowHeightExactly, wdRowHeightAtLeast

.Rows.Height = CentimetersToPoints(0.6) ' Zeilenhöhe

End With

...

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

Wo kann das Problem liegen?

Hey,

ich würde mal grade behaupten dass, das problem bei Windows bzw Microsoft liegt. Informier dich mal obs da irgendwelche änderungen im VBA oder so gab. Weil wenns vorher geklappt hat, muss es ja an dem neuen System liegen.

Hoffe das hat "geholfen" :D

MFG

EHamann

für vba: in word-vba reinkopiert, ausgeführt, geht. also an dem code liegts schonmal nicht (nur, dass r nicht gesetzt war, aber das dürfte bei dir ja der fall gewesen sein wenn es bisher funktioniert hatte).

Danke erstmal! Also Microsoft scheint auch keine Idee zu haben. Keine Reaktion! Ich habe nun herausgefunden, dass es wohl an meinem alten VisualStudio 6 liegt. Es läuft nicht 100%ig unter Windows 7. Wenn ich das Projekt (noch .vbp) öffne, dann läuft es noch. Aber wenn ich eine .exe erstelle, gehts eben nicht mehr. Da ich noch einen Rechner unter Vista zu laufen habe, ertelle ich die exe dort und die läuft dann auch unter Windows 7. Die Lösung wird wohl sein, das ganze Programm in eine .NET Version unter VisualStudio 2010 zu bringen (was wohl eine höllen Arbeit wird und viele Probleme bereiten wird). Danke an alle.

Da hast Du sicher Recht :)

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.