Thema Datum  Von Nutzer Rating
Antwort
05.12.2012 15:28:33 Raul Damian
NotSolved
06.12.2012 14:07:19 Lutz
****
NotSolved
10.12.2012 14:47:39 Raul Damian
NotSolved
10.12.2012 15:36:06 Lutz
*****
NotSolved
13.12.2012 09:46:36 Raul Damian
NotSolved
13.12.2012 10:11:10 Gast64473
*****
NotSolved
14.12.2012 14:51:22 Raul Damian
NotSolved
Blau Export Excel (Druckbereich) in Word per Button
14.12.2012 16:20:46 Lutz
NotSolved
18.12.2012 00:44:53 Raul Damian
NotSolved
18.12.2012 09:35:59 Lutz
NotSolved
19.12.2012 00:46:47 Raul Damian
NotSolved
21.12.2012 11:00:41 Lutz
NotSolved
21.12.2012 11:00:42 Lutz
NotSolved
21.12.2012 14:38:20 Raul Damian
NotSolved

Ansicht des Beitrags:
Von:
Lutz
Datum:
14.12.2012 16:20:46
Views:
1264
Rating: Antwort:
  Ja
Thema:
Export Excel (Druckbereich) in Word per Button

Hallo Raul,

Hier die Version mit Querformat und Tabellenlinien

Public Sub Sheet_in_Word()
    Dim appWord As Word.Application
    Dim doc As Object
    Dim sh As Worksheet
    Set sh = ActiveSheet
    Set appWord = CreateObject(Class:="Word.Application")
    appWord.Visible = True
    sh.Range(sh.PageSetup.PrintArea).Copy
    Set doc = appWord.Documents.Add
    appWord.Activate
    doc.Activate
    appWord.Selection.PasteExcelTable False, False, False
    With appWord.Selection.Tables(1)
        With .Borders(wdBorderLeft)
            .LineStyle = wdLineStyleSingle
            .LineWidth = wdLineWidth050pt
            .Color = wdColorAutomatic
        End With
        With .Borders(wdBorderRight)
            .LineStyle = wdLineStyleSingle
            .LineWidth = wdLineWidth050pt
            .Color = wdColorAutomatic
        End With
        With .Borders(wdBorderTop)
            .LineStyle = wdLineStyleSingle
            .LineWidth = wdLineWidth050pt
            .Color = wdColorAutomatic
        End With
        With .Borders(wdBorderBottom)
            .LineStyle = wdLineStyleSingle
            .LineWidth = wdLineWidth050pt
            .Color = wdColorAutomatic
        End With
        With .Borders(wdBorderHorizontal)
            .LineStyle = wdLineStyleSingle
            .LineWidth = wdLineWidth075pt
            .Color = wdColorAutomatic
        End With
        With .Borders(wdBorderVertical)
            .LineStyle = wdLineStyleSingle
            .LineWidth = wdLineWidth075pt
            .Color = wdColorAutomatic
        End With
        .Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
        .Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
        .Borders.Shadow = False
    End With
    With Options
        .DefaultBorderLineStyle = wdLineStyleSingle
        .DefaultBorderLineWidth = wdLineWidth050pt
        .DefaultBorderColor = wdColorAutomatic
    End With
    doc.PageSetup.Orientation = wdOrientLandscape
End Sub

Grüße Lutz


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
05.12.2012 15:28:33 Raul Damian
NotSolved
06.12.2012 14:07:19 Lutz
****
NotSolved
10.12.2012 14:47:39 Raul Damian
NotSolved
10.12.2012 15:36:06 Lutz
*****
NotSolved
13.12.2012 09:46:36 Raul Damian
NotSolved
13.12.2012 10:11:10 Gast64473
*****
NotSolved
14.12.2012 14:51:22 Raul Damian
NotSolved
Blau Export Excel (Druckbereich) in Word per Button
14.12.2012 16:20:46 Lutz
NotSolved
18.12.2012 00:44:53 Raul Damian
NotSolved
18.12.2012 09:35:59 Lutz
NotSolved
19.12.2012 00:46:47 Raul Damian
NotSolved
21.12.2012 11:00:41 Lutz
NotSolved
21.12.2012 11:00:42 Lutz
NotSolved
21.12.2012 14:38:20 Raul Damian
NotSolved