Re: Stuffing autocorrect entries separated by tabs into clipboard in Word 2003
- From: "Tony Jollans" <My forename at my surname dot com>
- Date: Mon, 4 Feb 2008 14:02:45 -0000
What do you mean by 'play'? All it does it put it in the clipboard for manual pasting.
--
Enjoy,
Tony
"Summer" <iDocs@xxxxxxxxxxxxxxxxxx> wrote in message news:epV3cVzZIHA.5984@xxxxxxxxxxxxxxxxxxxxxxx
Reference - fixed but does not play autocorrect?
"Summer" <iDocs@xxxxxxxxxxxxxxxxxx> wrote in message news:%23xreoTzZIHA.5088@xxxxxxxxxxxxxxxxxxxxxxxTony, I get an error:
User defined type not defined at NewDataObject
how do I fix that?
"Tony Jollans" <My forename at my surname dot com> wrote in message news:e2Y7JNzZIHA.4476@xxxxxxxxxxxxxxxxxxxxxxxI'm not entirely clear what you are trying to achieve or whether this is the best way of going about it, but this should be the syntax to do what you ask ..
Dim aTmp as string
Dim bTmp as string
Dim cTmp as string
aTmp = Application.AutoCorrect.Entries("UU").Value
bTmp = Application.AutoCorrect.Entries("PP").Value
cTmp = Application.AutoCorrect.Entries("MRN").Value
With New DataObject
.SetText aTmp & vbtab & bTmp & cTmp, 1
.PutInClipboard
End With
You will need a reference to the "Microsoft Forms 2.0 Object Library" - the easiest way might be just to add a blank userform to the project and it automatically be set.
--
Enjoy,
Tony
"Summer" <Summer@xxxxxxxxxxxxx> wrote in message news:uesNzZyZIHA.4180@xxxxxxxxxxxxxxxxxxxxxxxDue respect also what you propose will not work.
"Alan" <alanstancliff@xxxxxxxxxxxxxxxx> wrote in message news:u34yh4xZIHA.1204@xxxxxxxxxxxxxxxxxxxxxxxHi Summer,
With all due respect, that's not what I need. This is what I need, bearing in mind that I don't know very much about VBA
Dim aTmp as string
Dim bTmp as string
Dim cTmp as string
aTmp:=Autocorrect(UU) 'assign contents of autocorrect entry UU to aTmp (patient's last name)
bTmp:=Autocorrect(PP) 'assign contents of autocorrect entry PP to bTmp (patient's first name)
cTmp:+Autocorrect(MRN 'assign contents of autocorrect entry MRN to CTmp (medical record number)
clipboard:=aTmp + CHR(9) bTmp + CHR(9) + cTmp 'concatonate the patient's last name, tab, pt first name, tab, MRN into keyboard
That's what I need to be able to do. I assume VBA can do it. But how?
Regards,
Alan
"Summer" <Summer@xxxxxxxxxxxxx> wrote in message news:OKXvPfxZIHA.1960@xxxxxxxxxxxxxxxxxxxxxxxDo you know that Autocorrect is also in Excel which I am assuming is your spread*** - so you already have your expansion available (I use some 1850 entries) Does that help!
"Alan" <alanstancliff@xxxxxxxxxxxxxxxx> wrote in message news:ugGo1OxZIHA.5792@xxxxxxxxxxxxxxxxxxxxxxxThe document is divided into a header, a text area, and a footer with a page break. I am able to get the three items into three separate autocorrect entries. That way, instead of having to type out the patient's name half a dozen times, I can use the autocorrect entry so that typing UU (for first name) and PP (for last name) expands out into Ignatze Kadiddlehopper-VonStuppen (sorry, but it's late and I'm tired).
Anyhow, I've already got the macro written that creates an autocorrect entry for the medical record number (MRN), first name (UU), and last name (PP). These have been very useful over the past several days.
But I also enter these data into a spread***. One way of quickly doing that is to type out the following on a separate line:
MRN <then tab> PP <then tab>UU <then tab>
This results in
999988.....Kadiddlehopper-VonStuppen......Ignatz (where the spaces between these are actually tabs).
Then I can highlight these, hit <alt><x> to cut to the clipboard, hit <alt><shift> to switch to the spread***, place the cursor into the medical record cell, and hit <ctrl><v>, which pastes the whole shmeer into three adjacent cells.
What I hope to be able to do is to write a macro that will look into the silicone memory banks, find MRN, PP, UU, and then stuff the values into which they expand into the clipboard, separated of course by tabs.
Is that possible?
Regards,
Alan
"Graham Mayor" <gmayor@xxxxxxxxxxxxxxxxxx> wrote in message news:uBS01xwZIHA.5164@xxxxxxxxxxxxxxxxxxxxxxxHow do the three items appear in the document?
Can you display an example?
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Alan wrote:Here's what I want to do:
I am working in Word 2003, transcribing medical dictation. I receive a
document into which I transcribe the dictation. There are several
data in the supplied demographic ***: A medical record number, a
first name, and a last name. Thanks to help from this group, I
constructed a macro that creates an autocorrect entry for each of
these data.
I want to create a macro that will put these three data, separated by
tabs, into the clipboard buffer. That way, I can switch to a
spread*** and paste these three data into three adjacent cells and
switch back to Word.
I could just type them out onto the page, highlight, and block them
and maybe even figure out a way to record such a process as a macro.
But is there a way to do this on-the-fly without having to type the
data, or even have a macro type the data, into the document?
.
- Follow-Ups:
- References:
- Stuffing autocorrect entries separated by tabs into clipboard in Word 2003
- From: Alan
- Re: Stuffing autocorrect entries separated by tabs into clipboard in Word 2003
- From: Graham Mayor
- Re: Stuffing autocorrect entries separated by tabs into clipboard in Word 2003
- From: Alan
- Re: Stuffing autocorrect entries separated by tabs into clipboard in Word 2003
- From: Summer
- Re: Stuffing autocorrect entries separated by tabs into clipboard in Word 2003
- From: Alan
- Re: Stuffing autocorrect entries separated by tabs into clipboard in Word 2003
- From: Summer
- Re: Stuffing autocorrect entries separated by tabs into clipboard in Word 2003
- From: Tony Jollans
- Re: Stuffing autocorrect entries separated by tabs into clipboard in Word 2003
- From: Summer
- Re: Stuffing autocorrect entries separated by tabs into clipboard in Word 2003
- From: Summer
- Stuffing autocorrect entries separated by tabs into clipboard in Word 2003
- Prev by Date: Re: Stuffing autocorrect entries separated by tabs into clipboard in Word 2003
- Next by Date: Re: Stuffing autocorrect entries separated by tabs into clipboard in Word 2003
- Previous by thread: Re: Stuffing autocorrect entries separated by tabs into clipboard in Word 2003
- Next by thread: Re: Stuffing autocorrect entries separated by tabs into clipboard in Word 2003
- Index(es):