Thema Datum  Von Nutzer Rating
Antwort
07.01.2015 17:14:56 Dimi
*****
NotSolved
Blau Zellenwert von Excel nach Word
09.01.2015 10:02:37 Gast35667
NotSolved
09.01.2015 11:51:12 dimi
NotSolved
09.01.2015 21:05:00 Gast51711
*****
NotSolved
12.01.2015 14:00:45 dimi
*****
Solved
12.01.2015 23:08:45 Gast85595
NotSolved
13.01.2015 13:59:08 Dimi
Solved

Ansicht des Beitrags:
Von:
Gast35667
Datum:
09.01.2015 10:02:37
Views:
726
Rating: Antwort:
  Ja
Thema:
Zellenwert von Excel nach Word
Option Explicit

Sub WordDemo()
Dim c As Range, rngTo As Range
Dim strText As String

'Demo Daten
strText = Chr(WorksheetFunction.RandBetween(65, 90))
ThisWorkbook.Sheets.Add
For Each c In Range("A2:A4")
   c.Value = strText & Format(c.Row, "000")
Next c
ActiveSheet.UsedRange.Copy Destination:=Range("A6")
ActiveSheet.UsedRange.Copy Destination:=Range("A11")
Set rngTo = Range("A:A").ColumnDifferences(Comparison:=Range("A65536"))

strText = ""
For Each c In rngTo
   strText = strText & c.Value & Chr(10)
   'strText = strText & Chr(10) & c.Value ' - oder
Next c

'Demo Word -
' in Excel-VBA unter Extras / Verweise ''''''''''''''''''''''''''''''''''''''''
' die Microsoft Word 15.0 Object Library (oder gleichwertige Version) anhaken !
Dim oWordApp As Word.Application
Dim oWordDoc As Word.Document
Dim wdr As Word.Range
Set oWordApp = CreateObject("Word.Application")
Set oWordDoc = oWordApp.Documents.Open("C:\Temp\Matchcodes.docx")
Set wdr = oWordDoc.Content

'action
wdr.InsertAfter strText

'close
oWordDoc.Close
oWordApp.Quit

End Sub

 


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
07.01.2015 17:14:56 Dimi
*****
NotSolved
Blau Zellenwert von Excel nach Word
09.01.2015 10:02:37 Gast35667
NotSolved
09.01.2015 11:51:12 dimi
NotSolved
09.01.2015 21:05:00 Gast51711
*****
NotSolved
12.01.2015 14:00:45 dimi
*****
Solved
12.01.2015 23:08:45 Gast85595
NotSolved
13.01.2015 13:59:08 Dimi
Solved