Solved

Add in-line text to a Word document from a separate source document or file

Posted on 2014-12-21
5
220 Views
Last Modified: 2015-01-06
Hello,

When creating a document in MS Word (2013), what is the best or simplest way to add an in-line quotation or other text from a separate source document or file?

For example, suppose you have an Excel file which, in one column (say B), contains a list of quotations from a variety of individuals. And suppose an adjacent column (A) contains indexing or reference entries, in no specific order, consisting of the person's initials combined with a number.

For instance, say the list includes four quotations from Winston Churchill. These would appear in columns A & B as follows:
  A                B
wc01        "Character may be manifested…"
wc02        "Courage is the first of human qualities…"
wc03        "Men occasionally stumble…"
wc04        "Never in the field of human conflict…"
Now, suppose that as you are writing or editing your word document, you plan to include many of the quotations in the form of in-line insertions — but not in any particular order and perhaps more than once.

That could obviously be done, for a given quotation, by finding it in the list and then inserting it by copy/paste. But is it possible instead, to accomplish the same thing more quickly by somehow entering only that quotation's reference or lookup code?

Thanks
0
Comment
Question by:WeThotUWasAToad
  • 2
  • 2
5 Comments
 
LVL 14

Accepted Solution

by:
DrTribos earned 250 total points
ID: 40511903
I can think of two ways.

1. Add the ref and quote to auto correct

2. Create an events class and set up some binding to XL and create a scripting dictionary and load the xl info into that and every time you enter info have the events class check what you type and if you find a matiin the scripting dictionary then...
0
 
LVL 7

Assisted Solution

by:Gauthier
Gauthier earned 250 total points
ID: 40511932
I would use Autotext
and activate suggestion
 File>Options>Advanced>Editing Options>Show AutoComplete Suggestions.

See: http://gregmaxey.mvps.org/word_tip_pages/building_blocks_autotext.html
(about the middle of the page)

auto correct is a pain as it trigger automatically
0
 

Author Comment

by:WeThotUWasAToad
ID: 40512011
Thanks for the responses.

1. Add the ref and quote to auto correct
I would use Autotext
Don't all of the autos (ie  AutoCorrect,  AutoText, AutoComplete) require  pre-defining?  In other words, wouldn't that mean going in before hand  to specify what replacement or completion should be used in each individual case?

If that's correct, then it seems to defeat the purpose since I might as well  enter the full quotations  directly into the document in the first case.  That  would make sense to me if this was something intended to be used long-term for multiple documents but  that's not the case.  It's only needed for a single,  albeit large,   document. Apologies if I implied the former.

2. Create an events class and set up some binding to XL…
Sorry, but I have no idea what this means.
0
 
LVL 14

Assisted Solution

by:DrTribos
DrTribos earned 250 total points
ID: 40512023
Hi Mr Toad...  yes... creating an events class etc. is probably too much work for this... and defintely on the events side of things.   I'd suggest using auto correct - it seems to me you want to type wc01 and have the quote automatically appear.  other options will require additional clicking which I think would be more of a pain (but each to his own).

You could use a macro to populate your auto correct entries directly from excel, easier would be to copy paste the quotes into word and then use a macro to populate autocorrect (or whatever approach you'd like to use) without having to involve excel.
0
 
LVL 7

Assisted Solution

by:Gauthier
Gauthier earned 250 total points
ID: 40512057
Yes autotext need predefinition, however it can be done programmatically from your excel with a macro
something along the line of (didn't test the code):

    Dim oAutoText As AutoTextEntry
    Dim sPath
    Dim oTemplate
  
    'Create an AutoText with the current selection as the content
    'Word need to be opened on a new document before running that macro.
    Set obj­Word = CreateObject(“Word.Application”)
    sPath = objWord.Options.DefaultFilePath(wdUserTemplatesPath) & "\Normal.dotm"
    set oTemplate = Templates(sPath)
    For i = 1 to 100
        Set oAutoText = oTemplate.AutoTextEntries.Add(Name:=Cell(1,i).Value, Range:=objWord.ActiveDocument.Selection.Range)
        oAutoText.Value = Cell(2,i).Value
        Set oAutoText = Nothing
    Next

Open in new window

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now