Freelance Project Requests info@CodeDocu.de Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net
#

Download:

Datei 1: Demo_52_01.xlsm
Datei 2: Text_for_Emails.docx

Vba Code Beispiel:
mit Excel ein Word Dokument lesen.

 

 

In Word Makro ist der Code :

Dim app_Word As New Word.Application

Dim doc As Word.Document

Set doc = app_Word.Documents.Open(sWord_Filepath, ReadOnly:=True, Visible:=False)   

doc.Content.Copy

Dim cell As Range

Set cell = ActiveSheet.Range("C14")

cell.PasteSpecial xlPasteAll

 

 

 

Option Explicit On

 

Private Const iColumn_Senden As Integer = 2

Private Const iColumn_Anhang As Integer = 5

 

'===================< Region: Email >===================

 

Public Sub Button_Read_Word_File()

    '-------------< Button_Read_Word_File() >-------------

    '*Open and Read Word File in same Folder

    '-< init >-

 

    Dim sPath As String

    sPath = Application.ActiveWorkbook.Path

 

    Dim sWord_Filepath As String

    sWord_Filepath = sPath & "\" & "Text_for_Excel.docx"

    '-</ init >-

 

    Dim app_Word As New Word.Application

    Dim doc As Word.Document

    Set doc = app_Word.Documents.Open(sWord_Filepath, ReadOnly:=True, Visible:=False)

   

    '< copy word content >

    doc.Content.Copy

 

    Dim cell As Range

    Set cell = ActiveSheet.Range("C14")

    cell.PasteSpecial xlPasteAll

    '</ copy word content >

 

    '< close word >

    doc.Close SaveChanges:=False

    '</ close word >

 

    '-------------</ Button_Read_Word_File() >-------------

End Sub

 

 

 

Mobile
»
Errorcode 450 Using Email.Session.Accounts Email_From
»
Open and Read a Word File with Excel
»
Excel: REwrite RTF to HTML
»
Excel: Convert numbers, date and time to text
»
Excel: Convert letters to Ascii numbers around
»
Excel File Dialog for Selecting File-Paths to Worksheet
»
Excel Template: Automatically send an e-mail for a specific entry in Excel
»
Excel vba: recognize an input in cells
»
Excel, vba: insert image into a cell of cache
»
Excel: Formelfelder per Code kopieren

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de