Export Table To Word Excel VBA Macro

Поделиться
HTML-код
  • Опубликовано: 4 дек 2024

Комментарии • 12

  • @MohAboAbdo
    @MohAboAbdo Год назад +1

    Excellent video, thank you very much sir.

  • @PiyushMedicalKnowledge
    @PiyushMedicalKnowledge Год назад +1

    Good video bro

  • @eteam-e3m
    @eteam-e3m 11 месяцев назад

    what to do if i have bulk email address any changes is command ?

    • @ExcelMacroMania
      @ExcelMacroMania  11 месяцев назад

      I think you refer to another video, the one to send email from Excel? To send multiple emails check out this other video: ruclips.net/video/XpGzWvSr9j4/видео.htmlsi=DQ9Iki_DeyKsoea8

  • @eteam-e3m
    @eteam-e3m 11 месяцев назад

    If you can put that command code in description so life would be more easy

    • @ExcelMacroMania
      @ExcelMacroMania  11 месяцев назад

      There is a link to the code in the description for all my videos! Here you go again: excelmacroclass.blogspot.com/2023/03/export-table-to-word-excel-vba-macro.html

  • @ricksonppereira
    @ricksonppereira 11 месяцев назад

    how about to send to an specific word document? I mean, I have a bottom that I ask the name of the document, and I open this Userform in excel vba, and after I answer the "the name of the word document" I want to send the excel table to this specific document, how I do this?

    • @ExcelMacroMania
      @ExcelMacroMania  11 месяцев назад

      Instead or wordApp.Documents.Add you need to use wordApp.Documents(docName).Select, where docName is the name of the word document with extension (for example "mydoc.docx") assuming it is open.

    • @ricksonppereira
      @ricksonppereira 10 месяцев назад

      ​@@ExcelMacroMania That ain't working bro, check it yourself maybe you will notice and help me, and in this case it only will work for one specific docs name? I want to submiss the name of the doc on an userform and then find the doc (the doc could also already be open) and send the excel table, got it? I got other code here similar to this, but I can't do this last part

    • @ExcelMacroMania
      @ExcelMacroMania  10 месяцев назад

      @@ricksonppereira Should work if the doc gets open from within the macro... try to implement this:
      1. get name of folder and file
      docPath = "C:\Users\username\documents...."
      docName = "test.docx"
      2. create an instance of word application and open the doc (you can open any doc you want, or as many as you want.
      Set wordApp = CreateObject("Word.Application")
      With wordApp
      .Visible = True
      .Documents.Open docPath & Application.PathSeparator & docName
      End With
      3. copy the range or table you want to paste as picture
      Range("A1:D12").CopyPicture
      4. paste in the document you want (previously open within the same macro in point 2). Note that here you use only docName, as it's already open you don't need here the whole path.
      With wordApp
      .Documents(docName).Select
      .Selection.Paste
      End With
      5. Let me know if it works. Good luck!

  • @simracer1256
    @simracer1256 7 месяцев назад

    Are you on glue?

    • @ExcelMacroMania
      @ExcelMacroMania  7 месяцев назад

      I don't get it... what's the question?