Log in

View Full Version : How Winword VBA Open Excel File and Copy data to Excel



justuptou
05-23-2019, 07:33 PM
I have to create a coding by Winword VBA for get simply data from winword to Excel,

How to Get / Open Excel file in VBA

Seems like Excel VBA code as below,

' Open Winword File from Excel
Set WdApp = GetObject(, "Word Application")

If Err.Number = 429 Then
Err.Clear
Set WdApp = CreateObject("Word.Application")
End If

WdApp.Visible = True

strDocName = Application.GetOpenFilename(FileFilter:="Word Files (*.doc),*.doc", FilterIndex:=2, Title:="Select a File", MultiSelect:=False)

macropod
05-23-2019, 10:06 PM
This is essentially a duplicate of what you have asked in: http://www.vbaexpress.com/forum/showthread.php?65161-Can-I-use-Excel-VBA-with-data-to-create-a-WinWord-form-(Consists-to-control-Checkbox
Kindly don't post questions about the same issue in multiple threads. Thread closed. You may continue the discussion in your original thread.