Consulting

Results 1 to 2 of 2

Thread: How Winword VBA Open Excel File and Copy data to Excel

  1. #1
    VBAX Regular
    Joined
    Feb 2017
    Location
    Hong Kong
    Posts
    33
    Location

    How Winword VBA Open Excel File and Copy data to Excel

    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)

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    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.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •