+ Reply to Thread
Results 1 to 13 of 13

Create Macro/ Process to Send from Excel to Word Template

  1. #1
    Registered User
    Join Date
    08-31-2014
    Location
    Edmonton, Alberta, Canada
    MS-Off Ver
    2010
    Posts
    27

    Question Create Macro/ Process to Send from Excel to Word Template

    Hi!

    I have scoured the internet for solutions to my problem, and although many are close, I have yet to find the situation that applies to mine. If I have missed something somewhere, I apologize for the redundant post.

    Here is what I am trying to do:

    I have a spreadsheet full of data that relates to individual clients. Each row pertains to a different client and within that row contains information specific to that individual.

    We are currently using multiple Mail Merges to accomplish our paperwork/ tasks and this can be quite redundant with the amount of information we process on a daily basis.

    What I would like to do is have a button IN Excel on EVERY line that allows the user to send the information contained within that line to a specific report and then print that report.

    If possible, I would like to have the information go to a specific document based on information provided within the cells in the row. For example:

    If they type YES in one of the boxes then when the button is pressed it will go to "Document A". If they type NO in that box, then when the button is pressed it will go to "Document B". I hope that makes sense.

    I need the information contained within the spreadsheet to be moved to Word into specific spaces (similar to the mail merge).

    I would also like to add a second button that sends to separate report. This one too would be required on each line.

    The difference with this document would be that the spreadsheet would provide most of the information to Word, but the user would then be prompted on the Word end, to fill in the rest (fill in fields perhaps?). This too would be similar to the Mail Merge style.

    That is pretty much the extent of what I would like to do.

    I should mention that my experience with Visual Basic is next to ZERO, but I am very capable with computers and deductive reasoning, I just don't understand coding/ programming. So any templates/ step-by-step guides you can recommend/ provide would be greatly appreciated.

    I apologize for perhaps a very complicated scenario, but my local IT at work will not support this kind of process anymore. They have defined it as "beyond their scope".

    Thanks!

    Phil

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Create Macro/ Process to Send from Excel to Word Template

    Attach a sample workbook with SEVERAL sample data rows and a Word Template and I can help you with that.
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    08-31-2014
    Location
    Edmonton, Alberta, Canada
    MS-Off Ver
    2010
    Posts
    27

    Re: Create Macro/ Process to Send from Excel to Word Template

    Thank you! I have attached the documents.A DNA Basic Documents Merge 2014-OCT-01 Sample.docA DNA Basic Documents Merge 2014-OCT-01 Endorsement.doc00 DNA Database Master Copy.xlsx

    I would like for when they NO it goes to the one labeled SAMPLE. and when they say YES to the one labeled ENDORSEMENT.

    Also, any direction you can provide in terms of a step-by-step, if possible, would be very much appreciated.

    -Phil

  4. #4
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Create Macro/ Process to Send from Excel to Word Template

    Look for DNA Reports in the Ribbon.

    See if the interface is to your liking.

    The reports are dumped into the same folder as the excel file. You may want to do something different.

    I've also assumed you want to generate a file, but if you'd rather have it sent directly to a printer, we can change that.

    I also don't know how many reports you'll be dealing with at one time. If you have a lot, then we might want to add a filter to the userform to help narrow the list down.
    Attached Files Attached Files
    Last edited by Tinbendr; 01-31-2016 at 05:51 PM.

  5. #5
    Registered User
    Join Date
    08-31-2014
    Location
    Edmonton, Alberta, Canada
    MS-Off Ver
    2010
    Posts
    27

    Re: Create Macro/ Process to Send from Excel to Word Template

    Thanks for doing this!

    I am running into an error when creating the report though.

    When I click "Print" I get an error saying "Compile error: Can't find project or library"

    Not 100% sure why it's happening. Maybe there is something I need to do further?

    Also, I do not need to generate a file to save. It only needs to be sent to the printer.

  6. #6
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Create Macro/ Process to Send from Excel to Word Template

    Make sure word reference is set in tools->references.

  7. #7
    Registered User
    Join Date
    08-31-2014
    Location
    Edmonton, Alberta, Canada
    MS-Off Ver
    2010
    Posts
    27

    Re: Create Macro/ Process to Send from Excel to Word Template

    Alright, so that appears to have fixed that problem, but now I am getting Runtime error 5981: Could not open macro storage
    ???

  8. #8
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Create Macro/ Process to Send from Excel to Word Template

    Make sure the templates I sent back are in the same directory as the excel file.

  9. #9
    Registered User
    Join Date
    08-31-2014
    Location
    Edmonton, Alberta, Canada
    MS-Off Ver
    2010
    Posts
    27

    Re: Create Macro/ Process to Send from Excel to Word Template

    Alright. I opened each template and disabled "Protected View". That seems to have fixed that problem.

    Now, is there anyway to send directly to the printer instead of saving a document?

  10. #10
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Create Macro/ Process to Send from Excel to Word Template

    Replace this section in Module1 with this.
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    08-31-2014
    Location
    Edmonton, Alberta, Canada
    MS-Off Ver
    2010
    Posts
    27

    Re: Create Macro/ Process to Send from Excel to Word Template

    Alright, so that gets the process going, but it won't let me print more than one at a time. I get:

    Run-time error '-2147417848 (80010108)':
    Automation error
    The object invoked has disconnected from its clients.

  12. #12
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Create Macro/ Process to Send from Excel to Word Template

    Try to comment out this.
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    08-31-2014
    Location
    Edmonton, Alberta, Canada
    MS-Off Ver
    2010
    Posts
    27

    Re: Create Macro/ Process to Send from Excel to Word Template

    Hey. Check your email. I want to possibly do something else with this

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Template & Attachment - Send with Excel Macro
    By amitbhatt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-06-2015, 11:37 AM
  2. How to create word template with data from excel
    By gerimo in forum Word Formatting & General
    Replies: 1
    Last Post: 02-19-2015, 07:06 AM
  3. Send Data From Excel Userform to Microsoft Word Document Template
    By t0mps in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-09-2014, 03:18 PM
  4. Create Word Template from Excel Spreadsheet
    By drosen99 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-14-2012, 12:24 PM
  5. Create a word template including header and footer from excel
    By priyamvada in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-14-2010, 12:51 AM
  6. Replies: 2
    Last Post: 07-10-2005, 03:05 PM
  7. [SOLVED] i need to create an invioce in EXCEL and then send it into a WORD.
    By cassie in forum Excel General
    Replies: 1
    Last Post: 03-12-2005, 04:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1