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

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
WeThotUWasAToadAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DrTribosCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GauthierCommented:
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
WeThotUWasAToadAuthor Commented:
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
DrTribosCommented:
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
GauthierCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Word

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.