Thema Datum  Von Nutzer Rating
Antwort
16.12.2015 13:44:08 joshuah
NotSolved
16.12.2015 14:35:42 Gast79669
NotSolved
16.12.2015 14:38:31 Joshuah
NotSolved
16.12.2015 14:43:03 Joshuah
NotSolved
16.12.2015 15:52:22 Gast88646
NotSolved
16.12.2015 19:47:24 Gast38146
NotSolved
17.12.2015 11:08:47 Joshuah
NotSolved
Blau Bild aus Exceldokument in Word bei Textmarke ein (in Abhängigkeit zur Auswahl)
17.12.2015 11:13:02 Joshuah
NotSolved
17.12.2015 11:27:45 Gast48256
NotSolved
17.12.2015 11:33:59 Joshuah
NotSolved
17.12.2015 11:36:55 Gast35302
NotSolved
17.12.2015 11:37:27 Joshuah
NotSolved
17.12.2015 11:47:18 Gast66179
NotSolved
17.12.2015 11:55:20 Joshuah
NotSolved
17.12.2015 12:26:13 Gast9436
Solved
17.12.2015 12:58:53 Joshuah
Solved
17.12.2015 11:30:15 Joshuah
NotSolved

Ansicht des Beitrags:
Von:
Joshuah
Datum:
17.12.2015 11:13:02
Views:
1159
Rating: Antwort:
  Ja
Thema:
Bild aus Exceldokument in Word bei Textmarke ein (in Abhängigkeit zur Auswahl)

Fehlermeldung bleibt die gleiche... der Code ist aber dieser (musste natürlich schon noch die richtige Spaltenzahl eingeben..., Sorry!)

Klappt aber immer noch nicht. Die Fehlermeldung bezieht sich auf "pfad =". Diese ist neben "Private Sub CommandButton1_Click()" ebenfalls markiert und scheint beim kompilieren nicht zu funktionieren...

 

Private Sub CommandButton1_Click()
        Dim oExcelApp As Object
        Dim oExcelWorkbook As Object
        Dim lZeile As Long
            If ListBox2.ListIndex >= 0 Then
      
          
          Set oExcelApp = CreateObject("Excel.Application")
          Set oExcelWorkbook = oExcelApp.Workbooks.Open(sAdressDatei)
      
          lZeile = 2
          With oExcelWorkbook.Sheets(sTabellenblatt)
              Do While .Cells(lZeile, 1) <> ""
                 
                  If ListBox2.Text = CStr(.Cells(lZeile, 2).Value) Then
                     
                      ActiveDocument.Bookmarks("Linksunterschrift").Range.Text = _
                          CStr(.Cells(lZeile, 9).Value)
                      ActiveDocument.Bookmarks("Linksfunktion").Range.Text = _
                          CStr(.Cells(lZeile, 10).Value)
                      pfad = CStr(.Cells(lZeile, 11).Value)
                        ActiveDocument.Bookmarks("Bild").Range.InlineShapes.AddPicture FileName:=pfad, LinkToFile:=False, SaveWithDocument:=True
                            For i = 1 To ActiveDocument.InlineShapes
                            If ActiveDocument.InlineShapes(i).Type = 3 Then
                            ActiveDocument.InlineShapes(2).Width = 12
                            ActiveDocument.InlineShapes(2).Height = 6
                            Exit For
                     End If
                     Next i
                                     
                  Exit Do
                  End If
                  lZeile = lZeile + 1
              Loop
          End With
         
          oExcelWorkbook.Close False
          oExcelApp.Quit
      
      Else
          MsgBox "Bitte wählen Sie einen Eintrag aus der Liste aus!", _
              vbInformation + vbOKOnly, "HINWEIS!"
          Exit Sub
      End If

    Set oExcelWorkbook = Nothing
    Set oExcelApp = Nothing
    Unload Me
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
16.12.2015 13:44:08 joshuah
NotSolved
16.12.2015 14:35:42 Gast79669
NotSolved
16.12.2015 14:38:31 Joshuah
NotSolved
16.12.2015 14:43:03 Joshuah
NotSolved
16.12.2015 15:52:22 Gast88646
NotSolved
16.12.2015 19:47:24 Gast38146
NotSolved
17.12.2015 11:08:47 Joshuah
NotSolved
Blau Bild aus Exceldokument in Word bei Textmarke ein (in Abhängigkeit zur Auswahl)
17.12.2015 11:13:02 Joshuah
NotSolved
17.12.2015 11:27:45 Gast48256
NotSolved
17.12.2015 11:33:59 Joshuah
NotSolved
17.12.2015 11:36:55 Gast35302
NotSolved
17.12.2015 11:37:27 Joshuah
NotSolved
17.12.2015 11:47:18 Gast66179
NotSolved
17.12.2015 11:55:20 Joshuah
NotSolved
17.12.2015 12:26:13 Gast9436
Solved
17.12.2015 12:58:53 Joshuah
Solved
17.12.2015 11:30:15 Joshuah
NotSolved