#1
|
|||
|
|||
help of how doing several fields linking to excel vba
hello
i need to create automatically 22 docs that have several fields (xml or developer tool) and that every field get the data of a table of excel, so that i can have one template and create 22 docs with different info, every doc has a row of cells in the excell call i have seen that with vba for excel you can write lines of programming but i don't know the exact commands to do appart, is there any already library or doc createed? |
#2
|
||||
|
||||
This sounds like a job for mail merge. See E-Mail Merge Add-in
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
||||
|
||||
For the mailmerge basics, see:
How to use the Mail Merge feature in Word to create and to print form letters that use the data from an Excel worksheet - Microsoft Support Use mail merge for bulk email, letters, labels, and envelopes - Microsoft Support To split the output into separate documents, see also Send Mailmerge Output to Individual Files and Run a Mailmerge from Excel, Sending the Output to Individual Files in the Mailmerge Tips & Tricks 'Sticky' thread (https://www.msofficeforums.com/mail-...ps-tricks.html) at the top of the Mailmerge forum.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
thank you very much
i am going ro read this add in of graham that you have sent me i attach the doc in which the red data is the one i want to link with excel in the case of being only one document, i would like to use vba code to link with excel instead of using the merge add in, how can i do it? thanks |
#5
|
||||
|
||||
You don't need an add-in to do a normal mailmerge.
Conversely, you just want to link the document to one set of Excel cells, so the document content updates when the Excel data are changed, all you need do is copy the cells concerned and paste them into Word using Paste Special with the 'paste link' option and your preferred paste format.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
thank you,
but do you mean that this is better option that doing it with fields of xml? |
#7
|
||||
|
||||
No. The method to use is the one that's most appropriate to what you're trying to achieve. So, far, that's not entirely clear.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
what i have is one excel table of data and one word report of information
this report has in different pages and in different types (header, foot, tables, etc) the info to enter from excel. This fields changes for generating several reports or in the same report if i upload some cell of the excel. I enter this in different styles of text that can change the number of font or the bold or underline, that is why i ask the best solution to the problem |
#9
|
||||
|
||||
Without at least seeing a sample workbook and having an explanation of how the data in it relate to the document you uploaded, it's impossible to advise further.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#10
|
|||
|
|||
thank you very much
i upload an excel and word file as an example the red fields in the word has to be linked with the excel, if it is possible in vba code and with fields of xml, or maybe there is a better way to do |
#11
|
||||
|
||||
Since all your sample Excel data rows are the same, I can only assume you're trying to produce a document with a series of pages, each containing a table with the corresponding data from the Excel workbook, with one page per Excel row. In that case, use a mailmerge.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Linking fields using DOCVARIABLE | lisa99 | Word VBA | 1 | 07-01-2018 12:13 AM |
Linking Specific text fields in PP to specific cells in an Excel table | GWRW1964 | PowerPoint | 0 | 02-26-2018 07:37 AM |
Linking fields to pull values from one field to another | KWH | Word Tables | 3 | 01-27-2016 02:25 PM |
Automatic updating / Linking fields / cross referencing | Shaz | Word | 2 | 07-21-2014 09:43 PM |
Linking Text Fields in a document in Word 2007 | lcolson | Word | 0 | 12-22-2008 05:14 AM |