![]() |
#1
|
|||
|
|||
![]()
Hello all,
I am looking for a way to add a field in Word with information from a Excel file. I already found out how to import the whole thing, but that is not what I want. I want to be able to get just 1 cell with only that information. To maybe explain myself better I can describe why I want to use it. I want to make a template in Word with multiple fields with information from excel. Best would be to have one "master" field in Word where I can choose the customer information from. The other fields should then change their received information based on the master value. I know I can do this in excel, but Word would be better. I do not really trust the users in excel. So if I seperate it as front-end back-end I feel more secure with the data. Thanks in advance P.S. I looked a bit and found this code for a field: DATABASE \d {...} \s "SELECT * FROM `Sheet1$`" \h Where {...} is filled with information, but this is easier to read. Now I want to select indeed certain things from that sheet. Lets say I want to select only field A2. How can that be accomplished? P.P.S. Got it done. \s "SELECT * FROM `Sheet1$A1:A10` WHERE Nummer = 1" will only return the nummer 1. That is good. But I can only do this with A1:A10.. not with the B column. So still not done with this part xD But now I need some way to change the values from nummer = x. So that when I change x, the rest of the document will change (when I CTRL A, F9 it) Last edited by Evolta; 11-11-2013 at 09:00 AM. |
#2
|
|||
|
|||
![]()
This is my table:
|Number|Name|Age| |1|Frits|37| |2|Henk|48| |3|Tony|85| |4|Robin|21| ... This is my code: DATABASE {.....} \s "SELECT * FROM `Sheet1$A1:C10` WHERE Nummer = 2" What I want: - To change that code so that I can select just one cell. - To change the value of 2 to value X. Where X is a bookmark number somewhere on top of the document |
#3
|
|||
|
|||
![]()
http://www.mrexcel.com/forum/excel-q...-template.html
I saw this and Mail Merge does help ![]() But I wonder 2 things: 1) Do you really have to follow the steps all the time? -If not, does it update the fields? 2) Is it possible to add a (here he is again; bookmark) to navigate? Can someone help me out? |
#4
|
||||
|
||||
![]()
If you maintain the Excel workbook with the required structure and save the document as a mailmerge main document, the setup is a once-off exercise.
You can add bookmarks to your mailmerge main document to aid its navigation, but any bookmarks will be deleted from the output document. That's because a mailmerge typically generates multiple replicas of the mailmerge main document in a single output document, but a bookmark can only exist in a single location.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]()
First of all, thanks for the reply, I have some questions about it. Each time I learn new things and each time I notice my lack of knowledge appears bigger then I first thought.
Quote:
Quote:
Once navigated to the right information, can you save it as a new file (output document) so that the showed information is saved? |
#6
|
||||
|
||||
![]()
It is the Word document as a mailmerge main document. You can do that simply by saving it after selecting the data source.
You add bookmarks by selecting the range you want to bookmark and using Insert|Bookmark. You create the output file by clicking on Finish & Merge>Edit Individual Documents. You can then save that file with the finalised data in place. Your mailmerge main document is not affected by this.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
![]() Quote:
F.E. a 1 x 1 table gets a bookmark. Input are numbers of the customers. If you change that number, the rest of the information will be found based on that number. |
#8
|
||||
|
||||
![]()
Re:
Quote:
My previous posts have been in the context of your question: Quote:
Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
field controls for automation via excel | ajetrumpet | Word | 0 | 07-13-2013 09:48 PM |
Adding field in word in header in a bookmark in table with Excel vba Late Binding | Hdr | Excel Programming | 6 | 02-11-2013 02:58 AM |
![]() |
Hdr | Excel | 1 | 02-04-2013 04:40 PM |
Import field from Excel to Powerpoint | xgravity23 | Office | 8 | 11-22-2012 02:08 PM |
Can I embed a Ref field in an If field in Word 2003? | skarden | Word | 2 | 01-05-2012 03:55 PM |