Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
binar binar is offline
external usenet poster
 
Posts: 90
Default Autogenerated Acronyms List?

Fellow Forum Members,
I'm using WORD 2003 for a 500 page Technical Manual and I'm wondering what
is the best way to develop an Acronym List while I write the manual? Is
there some way to tag each acronym as I create it and then autogenerate a
LIST OF ACRONYMS by pulling together all of the tagged acronyms into a table?
Even better, it would be cool if the acronym definition will also get pulled
as part of a different tag for placement in a separate table column. Any
ideas will be appreciated.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Autogenerated Acronyms List?

'Autogenerated' is asking a lot, but you can easily copy selected Acronyms
to a table for later creation into a list with a simple macro.
Create a two column/one row empty table. Put the cursor below the table and
save it. Substitute the name and path for the filename in the following
macro.

Sub SaveAcronyms()
On Error GoTo oops
Selection.copy
Documents.Open _
FileName:="""D:\My Documents\Acronym List.doc"""
With Selection
.EndKey Unit:=wdStory
.MoveUp Unit:=wdLine, Count:=1
.Paste
.MoveRight Unit:=wdCell, Count:=2
.MoveDown Unit:=wdLine, Count:=1
End With
ActiveDocument.Close SaveChanges:=wdSaveChanges
Exit Sub
oops:
MsgBox "Copy text first!"
End Sub

Select the acronym and run the macro (attached to a shortcut key combination
would be good) and it will be added to the next row of the table.
http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Fellow Forum Members,
I'm using WORD 2003 for a 500 page Technical Manual and I'm wondering
what is the best way to develop an Acronym List while I write the
manual? Is there some way to tag each acronym as I create it and
then autogenerate a LIST OF ACRONYMS by pulling together all of the
tagged acronyms into a table? Even better, it would be cool if the
acronym definition will also get pulled as part of a different tag
for placement in a separate table column. Any ideas will be
appreciated.



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
binar binar is offline
external usenet poster
 
Posts: 90
Default Autogenerated Acronyms List?

Graham,
Thanks for the Macro. I tried it out and I'm amazed with what you have done.
It's an elegant solution for keeping an Acronym List in parallel with the
process of writing a technical manual. However, I'm kind of confused about
something. You instructed me to create a table with two columns. Currently,
the macro is only plugging in data into one column.

So for example I have the following acronym to apply your macro on:

" World Wide Web (WWW) "

Ideally, highlighting the entire line of text and then running the macro
should plugin " WWW " in column 1 and " World Wide Web " in column 2. Is
this to complicated to make happen? Is there some way to make the Macro
recognize the paranthesis " ( ) " symbols as data that needs to be plugged
into column 1? I'm curious to know what you think. Again, thanks for the
macro.


"Graham Mayor" wrote:

'Autogenerated' is asking a lot, but you can easily copy selected Acronyms
to a table for later creation into a list with a simple macro.
Create a two column/one row empty table. Put the cursor below the table and
save it. Substitute the name and path for the filename in the following
macro.

Sub SaveAcronyms()
On Error GoTo oops
Selection.copy
Documents.Open _
FileName:="""D:\My Documents\Acronym List.doc"""
With Selection
.EndKey Unit:=wdStory
.MoveUp Unit:=wdLine, Count:=1
.Paste
.MoveRight Unit:=wdCell, Count:=2
.MoveDown Unit:=wdLine, Count:=1
End With
ActiveDocument.Close SaveChanges:=wdSaveChanges
Exit Sub
oops:
MsgBox "Copy text first!"
End Sub

Select the acronym and run the macro (attached to a shortcut key combination
would be good) and it will be added to the next row of the table.
http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Fellow Forum Members,
I'm using WORD 2003 for a 500 page Technical Manual and I'm wondering
what is the best way to develop an Acronym List while I write the
manual? Is there some way to tag each acronym as I create it and
then autogenerate a LIST OF ACRONYMS by pulling together all of the
tagged acronyms into a table? Even better, it would be cool if the
acronym definition will also get pulled as part of a different tag
for placement in a separate table column. Any ideas will be
appreciated.




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Autogenerated Acronyms List?

The macro was intended to to use only one column with the other column
reserved for your description as apepared to be the case from your original
request. the change your require is fairly straightforward - how about:

Sub SaveAcronyms()
Dim sAcronym As String
Dim sFirst As String
Dim sSecond As String
Dim intPos As Integer
On Error GoTo oops
sAcronym = Selection.Range
intPos = InStr(sAcronym, "(")
sFirst = Left(sAcronym, Len(sAcronym) - (Len(sAcronym) - (intPos - 2)))
sLast = Mid(sAcronym, intPos + 1, Len(sAcronym) - (intPos + 1))
Documents.Open _
FileName:="""D:\My Documents\Acronym List.doc"""
With Selection
.EndKey Unit:=wdStory
.MoveUp Unit:=wdLine, Count:=1
.TypeText Text:=sFirst
.MoveRight Unit:=wdCell
.TypeText Text:=sLast
.MoveRight Unit:=wdCell
.MoveDown Unit:=wdLine, Count:=1
End With
ActiveDocument.Close SaveChanges:=wdSaveChanges
Exit Sub
oops:
MsgBox "Copy text first!"
End Sub

This should work with the same table document (change the name and path as
before) select only the text eg
World Wide Web (WWW) (and not the macro). If you want to swap the columns
then swap the two TypeText lines around.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Graham,
Thanks for the Macro. I tried it out and I'm amazed with what you
have done. It's an elegant solution for keeping an Acronym List in
parallel with the process of writing a technical manual. However, I'm
kind of confused about something. You instructed me to create a table
with two columns. Currently, the macro is only plugging in data into
one column.

So for example I have the following acronym to apply your macro on:

" World Wide Web (WWW) "

Ideally, highlighting the entire line of text and then running the
macro should plugin " WWW " in column 1 and " World Wide Web " in
column 2. Is this to complicated to make happen? Is there some way
to make the Macro recognize the paranthesis " ( ) " symbols as data
that needs to be plugged into column 1? I'm curious to know what you
think. Again, thanks for the macro.


"Graham Mayor" wrote:

'Autogenerated' is asking a lot, but you can easily copy selected
Acronyms to a table for later creation into a list with a simple
macro.
Create a two column/one row empty table. Put the cursor below the
table and save it. Substitute the name and path for the filename in
the following macro.

Sub SaveAcronyms()
On Error GoTo oops
Selection.copy
Documents.Open _
FileName:="""D:\My Documents\Acronym List.doc"""
With Selection
.EndKey Unit:=wdStory
.MoveUp Unit:=wdLine, Count:=1
.Paste
.MoveRight Unit:=wdCell, Count:=2
.MoveDown Unit:=wdLine, Count:=1
End With
ActiveDocument.Close SaveChanges:=wdSaveChanges
Exit Sub
oops:
MsgBox "Copy text first!"
End Sub

Select the acronym and run the macro (attached to a shortcut key
combination would be good) and it will be added to the next row of
the table. http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Fellow Forum Members,
I'm using WORD 2003 for a 500 page Technical Manual and I'm
wondering what is the best way to develop an Acronym List while I
write the manual? Is there some way to tag each acronym as I
create it and then autogenerate a LIST OF ACRONYMS by pulling
together all of the tagged acronyms into a table? Even better, it
would be cool if the acronym definition will also get pulled as
part of a different tag for placement in a separate table column.
Any ideas will be appreciated.



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
binar binar is offline
external usenet poster
 
Posts: 90
Default Autogenerated Acronyms List?

Graham,
Your macro is amazing! It's going to facilitate the task of compiling an
Acronym List tremendously. However, for some reason the macro is not dropping
the RIGHT side paranthesis ")" when it plugs in the acronym in column 2. It
shows as "WWW)". The LEFT one however is being dropped by the Macro. To me
it's no big problem because I can easily eliminate this unwanted paranthesis
by using a Find and Replace operation. Again, thanks a lot for the macro.

"Graham Mayor" wrote:

The macro was intended to to use only one column with the other column
reserved for your description as apepared to be the case from your original
request. the change your require is fairly straightforward - how about:

Sub SaveAcronyms()
Dim sAcronym As String
Dim sFirst As String
Dim sSecond As String
Dim intPos As Integer
On Error GoTo oops
sAcronym = Selection.Range
intPos = InStr(sAcronym, "(")
sFirst = Left(sAcronym, Len(sAcronym) - (Len(sAcronym) - (intPos - 2)))
sLast = Mid(sAcronym, intPos + 1, Len(sAcronym) - (intPos + 1))
Documents.Open _
FileName:="""D:\My Documents\Acronym List.doc"""
With Selection
.EndKey Unit:=wdStory
.MoveUp Unit:=wdLine, Count:=1
.TypeText Text:=sFirst
.MoveRight Unit:=wdCell
.TypeText Text:=sLast
.MoveRight Unit:=wdCell
.MoveDown Unit:=wdLine, Count:=1
End With
ActiveDocument.Close SaveChanges:=wdSaveChanges
Exit Sub
oops:
MsgBox "Copy text first!"
End Sub

This should work with the same table document (change the name and path as
before) select only the text eg
World Wide Web (WWW) (and not the macro). If you want to swap the columns
then swap the two TypeText lines around.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Graham,
Thanks for the Macro. I tried it out and I'm amazed with what you
have done. It's an elegant solution for keeping an Acronym List in
parallel with the process of writing a technical manual. However, I'm
kind of confused about something. You instructed me to create a table
with two columns. Currently, the macro is only plugging in data into
one column.

So for example I have the following acronym to apply your macro on:

" World Wide Web (WWW) "

Ideally, highlighting the entire line of text and then running the
macro should plugin " WWW " in column 1 and " World Wide Web " in
column 2. Is this to complicated to make happen? Is there some way
to make the Macro recognize the paranthesis " ( ) " symbols as data
that needs to be plugged into column 1? I'm curious to know what you
think. Again, thanks for the macro.


"Graham Mayor" wrote:

'Autogenerated' is asking a lot, but you can easily copy selected
Acronyms to a table for later creation into a list with a simple
macro.
Create a two column/one row empty table. Put the cursor below the
table and save it. Substitute the name and path for the filename in
the following macro.

Sub SaveAcronyms()
On Error GoTo oops
Selection.copy
Documents.Open _
FileName:="""D:\My Documents\Acronym List.doc"""
With Selection
.EndKey Unit:=wdStory
.MoveUp Unit:=wdLine, Count:=1
.Paste
.MoveRight Unit:=wdCell, Count:=2
.MoveDown Unit:=wdLine, Count:=1
End With
ActiveDocument.Close SaveChanges:=wdSaveChanges
Exit Sub
oops:
MsgBox "Copy text first!"
End Sub

Select the acronym and run the macro (attached to a shortcut key
combination would be good) and it will be added to the next row of
the table. http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Fellow Forum Members,
I'm using WORD 2003 for a 500 page Technical Manual and I'm
wondering what is the best way to develop an Acronym List while I
write the manual? Is there some way to tag each acronym as I
create it and then autogenerate a LIST OF ACRONYMS by pulling
together all of the tagged acronyms into a table? Even better, it
would be cool if the acronym definition will also get pulled as
part of a different tag for placement in a separate table column.
Any ideas will be appreciated.






  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Autogenerated Acronyms List?

It appears you are selecting the space after the right bracket when
selecting the text to process. If you habitually do this, change the sLast
line as follows.

sLast = Mid(sAcronym, intPos + 1, Len(sAcronym) - (intPos + 2))


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Graham,
Your macro is amazing! It's going to facilitate the task of compiling
an Acronym List tremendously. However, for some reason the macro is
not dropping the RIGHT side paranthesis ")" when it plugs in the
acronym in column 2. It shows as "WWW)". The LEFT one however is
being dropped by the Macro. To me it's no big problem because I can
easily eliminate this unwanted paranthesis by using a Find and
Replace operation. Again, thanks a lot for the macro.

"Graham Mayor" wrote:

The macro was intended to to use only one column with the other
column reserved for your description as apepared to be the case from
your original request. the change your require is fairly
straightforward - how about:

Sub SaveAcronyms()
Dim sAcronym As String
Dim sFirst As String
Dim sSecond As String
Dim intPos As Integer
On Error GoTo oops
sAcronym = Selection.Range
intPos = InStr(sAcronym, "(")
sFirst = Left(sAcronym, Len(sAcronym) - (Len(sAcronym) - (intPos
- 2))) sLast = Mid(sAcronym, intPos + 1, Len(sAcronym) - (intPos
+ 1)) Documents.Open _
FileName:="""D:\My Documents\Acronym List.doc"""
With Selection
.EndKey Unit:=wdStory
.MoveUp Unit:=wdLine, Count:=1
.TypeText Text:=sFirst
.MoveRight Unit:=wdCell
.TypeText Text:=sLast
.MoveRight Unit:=wdCell
.MoveDown Unit:=wdLine, Count:=1
End With
ActiveDocument.Close SaveChanges:=wdSaveChanges
Exit Sub
oops:
MsgBox "Copy text first!"
End Sub

This should work with the same table document (change the name and
path as before) select only the text eg
World Wide Web (WWW) (and not the macro). If you want to swap the
columns then swap the two TypeText lines around.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Graham,
Thanks for the Macro. I tried it out and I'm amazed with what you
have done. It's an elegant solution for keeping an Acronym List in
parallel with the process of writing a technical manual. However,
I'm kind of confused about something. You instructed me to create a
table with two columns. Currently, the macro is only plugging in
data into one column.

So for example I have the following acronym to apply your macro on:

" World Wide Web (WWW) "

Ideally, highlighting the entire line of text and then running the
macro should plugin " WWW " in column 1 and " World Wide Web " in
column 2. Is this to complicated to make happen? Is there some way
to make the Macro recognize the paranthesis " ( ) " symbols as data
that needs to be plugged into column 1? I'm curious to know what
you think. Again, thanks for the macro.


"Graham Mayor" wrote:

'Autogenerated' is asking a lot, but you can easily copy selected
Acronyms to a table for later creation into a list with a simple
macro.
Create a two column/one row empty table. Put the cursor below the
table and save it. Substitute the name and path for the filename in
the following macro.

Sub SaveAcronyms()
On Error GoTo oops
Selection.copy
Documents.Open _
FileName:="""D:\My Documents\Acronym List.doc"""
With Selection
.EndKey Unit:=wdStory
.MoveUp Unit:=wdLine, Count:=1
.Paste
.MoveRight Unit:=wdCell, Count:=2
.MoveDown Unit:=wdLine, Count:=1
End With
ActiveDocument.Close SaveChanges:=wdSaveChanges
Exit Sub
oops:
MsgBox "Copy text first!"
End Sub

Select the acronym and run the macro (attached to a shortcut key
combination would be good) and it will be added to the next row of
the table. http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Fellow Forum Members,
I'm using WORD 2003 for a 500 page Technical Manual and I'm
wondering what is the best way to develop an Acronym List while I
write the manual? Is there some way to tag each acronym as I
create it and then autogenerate a LIST OF ACRONYMS by pulling
together all of the tagged acronyms into a table? Even better, it
would be cool if the acronym definition will also get pulled as
part of a different tag for placement in a separate table column.
Any ideas will be appreciated.



  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Al[_2_] Al[_2_] is offline
external usenet poster
 
Posts: 6
Default Autogenerated Acronyms List?

Here is a way of finding all acronyms in a document:

Do a find/Replace with wildcards:
Find [A-Z]{2,}
This is Beginning of word, at least 2 chars A-Z, end of word
Replace with: ~^p^&^p and a unique style not found in document. (the
tilde is an unused character in document) (I use Body Text 2)
Then do a Find ~^p style Body Text 2
Replace with ^p style Normal.
The result is a paragraph with each acronym with a unique style.
Then Insert a List of figures at the top of the document using Style Body
Text 2.
Copy the List of Figures, sort and delete duplicates.


"Graham Mayor" wrote in
:

'Autogenerated' is asking a lot, but you can easily copy selected
Acronyms to a table for later creation into a list with a simple
macro. Create a two column/one row empty table. Put the cursor below
the table and save it. Substitute the name and path for the filename
in the following macro.


  #8   Report Post  
Posted to microsoft.public.word.docmanagement
binar binar is offline
external usenet poster
 
Posts: 90
Default Autogenerated Acronyms List?

Graham, thanks for the updates to your macro. With the changes you told me to
make I got your macro working exactly the way I want to work. Thanks again
mate.

Al, thanks for your post. I will keep your Find/Replace operation in mind.

"Graham Mayor" wrote:

It appears you are selecting the space after the right bracket when
selecting the text to process. If you habitually do this, change the sLast
line as follows.

sLast = Mid(sAcronym, intPos + 1, Len(sAcronym) - (intPos + 2))


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Graham,
Your macro is amazing! It's going to facilitate the task of compiling
an Acronym List tremendously. However, for some reason the macro is
not dropping the RIGHT side paranthesis ")" when it plugs in the
acronym in column 2. It shows as "WWW)". The LEFT one however is
being dropped by the Macro. To me it's no big problem because I can
easily eliminate this unwanted paranthesis by using a Find and
Replace operation. Again, thanks a lot for the macro.

"Graham Mayor" wrote:

The macro was intended to to use only one column with the other
column reserved for your description as apepared to be the case from
your original request. the change your require is fairly
straightforward - how about:

Sub SaveAcronyms()
Dim sAcronym As String
Dim sFirst As String
Dim sSecond As String
Dim intPos As Integer
On Error GoTo oops
sAcronym = Selection.Range
intPos = InStr(sAcronym, "(")
sFirst = Left(sAcronym, Len(sAcronym) - (Len(sAcronym) - (intPos
- 2))) sLast = Mid(sAcronym, intPos + 1, Len(sAcronym) - (intPos
+ 1)) Documents.Open _
FileName:="""D:\My Documents\Acronym List.doc"""
With Selection
.EndKey Unit:=wdStory
.MoveUp Unit:=wdLine, Count:=1
.TypeText Text:=sFirst
.MoveRight Unit:=wdCell
.TypeText Text:=sLast
.MoveRight Unit:=wdCell
.MoveDown Unit:=wdLine, Count:=1
End With
ActiveDocument.Close SaveChanges:=wdSaveChanges
Exit Sub
oops:
MsgBox "Copy text first!"
End Sub

This should work with the same table document (change the name and
path as before) select only the text eg
World Wide Web (WWW) (and not the macro). If you want to swap the
columns then swap the two TypeText lines around.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Graham,
Thanks for the Macro. I tried it out and I'm amazed with what you
have done. It's an elegant solution for keeping an Acronym List in
parallel with the process of writing a technical manual. However,
I'm kind of confused about something. You instructed me to create a
table with two columns. Currently, the macro is only plugging in
data into one column.

So for example I have the following acronym to apply your macro on:

" World Wide Web (WWW) "

Ideally, highlighting the entire line of text and then running the
macro should plugin " WWW " in column 1 and " World Wide Web " in
column 2. Is this to complicated to make happen? Is there some way
to make the Macro recognize the paranthesis " ( ) " symbols as data
that needs to be plugged into column 1? I'm curious to know what
you think. Again, thanks for the macro.


"Graham Mayor" wrote:

'Autogenerated' is asking a lot, but you can easily copy selected
Acronyms to a table for later creation into a list with a simple
macro.
Create a two column/one row empty table. Put the cursor below the
table and save it. Substitute the name and path for the filename in
the following macro.

Sub SaveAcronyms()
On Error GoTo oops
Selection.copy
Documents.Open _
FileName:="""D:\My Documents\Acronym List.doc"""
With Selection
.EndKey Unit:=wdStory
.MoveUp Unit:=wdLine, Count:=1
.Paste
.MoveRight Unit:=wdCell, Count:=2
.MoveDown Unit:=wdLine, Count:=1
End With
ActiveDocument.Close SaveChanges:=wdSaveChanges
Exit Sub
oops:
MsgBox "Copy text first!"
End Sub

Select the acronym and run the macro (attached to a shortcut key
combination would be good) and it will be added to the next row of
the table. http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Fellow Forum Members,
I'm using WORD 2003 for a 500 page Technical Manual and I'm
wondering what is the best way to develop an Acronym List while I
write the manual? Is there some way to tag each acronym as I
create it and then autogenerate a LIST OF ACRONYMS by pulling
together all of the tagged acronyms into a table? Even better, it
would be cool if the acronym definition will also get pulled as
part of a different tag for placement in a separate table column.
Any ideas will be appreciated.




  #9   Report Post  
Posted to microsoft.public.word.docmanagement
binar binar is offline
external usenet poster
 
Posts: 90
Default Autogenerated Acronyms List?

Graham, thanks for the help with your macro. It now works exactly the way I
need it to work. Thanks again mate.

Al, thanks for your post. I will keep your Find / Replace operation in mind.

"Graham Mayor" wrote:

It appears you are selecting the space after the right bracket when
selecting the text to process. If you habitually do this, change the sLast
line as follows.

sLast = Mid(sAcronym, intPos + 1, Len(sAcronym) - (intPos + 2))


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Graham,
Your macro is amazing! It's going to facilitate the task of compiling
an Acronym List tremendously. However, for some reason the macro is
not dropping the RIGHT side paranthesis ")" when it plugs in the
acronym in column 2. It shows as "WWW)". The LEFT one however is
being dropped by the Macro. To me it's no big problem because I can
easily eliminate this unwanted paranthesis by using a Find and
Replace operation. Again, thanks a lot for the macro.

"Graham Mayor" wrote:

The macro was intended to to use only one column with the other
column reserved for your description as apepared to be the case from
your original request. the change your require is fairly
straightforward - how about:

Sub SaveAcronyms()
Dim sAcronym As String
Dim sFirst As String
Dim sSecond As String
Dim intPos As Integer
On Error GoTo oops
sAcronym = Selection.Range
intPos = InStr(sAcronym, "(")
sFirst = Left(sAcronym, Len(sAcronym) - (Len(sAcronym) - (intPos
- 2))) sLast = Mid(sAcronym, intPos + 1, Len(sAcronym) - (intPos
+ 1)) Documents.Open _
FileName:="""D:\My Documents\Acronym List.doc"""
With Selection
.EndKey Unit:=wdStory
.MoveUp Unit:=wdLine, Count:=1
.TypeText Text:=sFirst
.MoveRight Unit:=wdCell
.TypeText Text:=sLast
.MoveRight Unit:=wdCell
.MoveDown Unit:=wdLine, Count:=1
End With
ActiveDocument.Close SaveChanges:=wdSaveChanges
Exit Sub
oops:
MsgBox "Copy text first!"
End Sub

This should work with the same table document (change the name and
path as before) select only the text eg
World Wide Web (WWW) (and not the macro). If you want to swap the
columns then swap the two TypeText lines around.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Graham,
Thanks for the Macro. I tried it out and I'm amazed with what you
have done. It's an elegant solution for keeping an Acronym List in
parallel with the process of writing a technical manual. However,
I'm kind of confused about something. You instructed me to create a
table with two columns. Currently, the macro is only plugging in
data into one column.

So for example I have the following acronym to apply your macro on:

" World Wide Web (WWW) "

Ideally, highlighting the entire line of text and then running the
macro should plugin " WWW " in column 1 and " World Wide Web " in
column 2. Is this to complicated to make happen? Is there some way
to make the Macro recognize the paranthesis " ( ) " symbols as data
that needs to be plugged into column 1? I'm curious to know what
you think. Again, thanks for the macro.


"Graham Mayor" wrote:

'Autogenerated' is asking a lot, but you can easily copy selected
Acronyms to a table for later creation into a list with a simple
macro.
Create a two column/one row empty table. Put the cursor below the
table and save it. Substitute the name and path for the filename in
the following macro.

Sub SaveAcronyms()
On Error GoTo oops
Selection.copy
Documents.Open _
FileName:="""D:\My Documents\Acronym List.doc"""
With Selection
.EndKey Unit:=wdStory
.MoveUp Unit:=wdLine, Count:=1
.Paste
.MoveRight Unit:=wdCell, Count:=2
.MoveDown Unit:=wdLine, Count:=1
End With
ActiveDocument.Close SaveChanges:=wdSaveChanges
Exit Sub
oops:
MsgBox "Copy text first!"
End Sub

Select the acronym and run the macro (attached to a shortcut key
combination would be good) and it will be added to the next row of
the table. http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Fellow Forum Members,
I'm using WORD 2003 for a 500 page Technical Manual and I'm
wondering what is the best way to develop an Acronym List while I
write the manual? Is there some way to tag each acronym as I
create it and then autogenerate a LIST OF ACRONYMS by pulling
together all of the tagged acronyms into a table? Even better, it
would be cool if the acronym definition will also get pulled as
part of a different tag for placement in a separate table column.
Any ideas will be appreciated.




  #10   Report Post  
Posted to microsoft.public.word.docmanagement
binar binar is offline
external usenet poster
 
Posts: 90
Default Autogenerated Acronyms List?

Graham, thanks for the help with your macro. It now works exactly the way I
need it to work. Thanks again mate.

Al, thanks for your post. I will keep your Find / Replace operation in mind.

"Graham Mayor" wrote:

It appears you are selecting the space after the right bracket when
selecting the text to process. If you habitually do this, change the sLast
line as follows.

sLast = Mid(sAcronym, intPos + 1, Len(sAcronym) - (intPos + 2))


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Graham,
Your macro is amazing! It's going to facilitate the task of compiling
an Acronym List tremendously. However, for some reason the macro is
not dropping the RIGHT side paranthesis ")" when it plugs in the
acronym in column 2. It shows as "WWW)". The LEFT one however is
being dropped by the Macro. To me it's no big problem because I can
easily eliminate this unwanted paranthesis by using a Find and
Replace operation. Again, thanks a lot for the macro.

"Graham Mayor" wrote:

The macro was intended to to use only one column with the other
column reserved for your description as apepared to be the case from
your original request. the change your require is fairly
straightforward - how about:

Sub SaveAcronyms()
Dim sAcronym As String
Dim sFirst As String
Dim sSecond As String
Dim intPos As Integer
On Error GoTo oops
sAcronym = Selection.Range
intPos = InStr(sAcronym, "(")
sFirst = Left(sAcronym, Len(sAcronym) - (Len(sAcronym) - (intPos
- 2))) sLast = Mid(sAcronym, intPos + 1, Len(sAcronym) - (intPos
+ 1)) Documents.Open _
FileName:="""D:\My Documents\Acronym List.doc"""
With Selection
.EndKey Unit:=wdStory
.MoveUp Unit:=wdLine, Count:=1
.TypeText Text:=sFirst
.MoveRight Unit:=wdCell
.TypeText Text:=sLast
.MoveRight Unit:=wdCell
.MoveDown Unit:=wdLine, Count:=1
End With
ActiveDocument.Close SaveChanges:=wdSaveChanges
Exit Sub
oops:
MsgBox "Copy text first!"
End Sub

This should work with the same table document (change the name and
path as before) select only the text eg
World Wide Web (WWW) (and not the macro). If you want to swap the
columns then swap the two TypeText lines around.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Graham,
Thanks for the Macro. I tried it out and I'm amazed with what you
have done. It's an elegant solution for keeping an Acronym List in
parallel with the process of writing a technical manual. However,
I'm kind of confused about something. You instructed me to create a
table with two columns. Currently, the macro is only plugging in
data into one column.

So for example I have the following acronym to apply your macro on:

" World Wide Web (WWW) "

Ideally, highlighting the entire line of text and then running the
macro should plugin " WWW " in column 1 and " World Wide Web " in
column 2. Is this to complicated to make happen? Is there some way
to make the Macro recognize the paranthesis " ( ) " symbols as data
that needs to be plugged into column 1? I'm curious to know what
you think. Again, thanks for the macro.


"Graham Mayor" wrote:

'Autogenerated' is asking a lot, but you can easily copy selected
Acronyms to a table for later creation into a list with a simple
macro.
Create a two column/one row empty table. Put the cursor below the
table and save it. Substitute the name and path for the filename in
the following macro.

Sub SaveAcronyms()
On Error GoTo oops
Selection.copy
Documents.Open _
FileName:="""D:\My Documents\Acronym List.doc"""
With Selection
.EndKey Unit:=wdStory
.MoveUp Unit:=wdLine, Count:=1
.Paste
.MoveRight Unit:=wdCell, Count:=2
.MoveDown Unit:=wdLine, Count:=1
End With
ActiveDocument.Close SaveChanges:=wdSaveChanges
Exit Sub
oops:
MsgBox "Copy text first!"
End Sub

Select the acronym and run the macro (attached to a shortcut key
combination would be good) and it will be added to the next row of
the table. http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


binar wrote:
Fellow Forum Members,
I'm using WORD 2003 for a 500 page Technical Manual and I'm
wondering what is the best way to develop an Acronym List while I
write the manual? Is there some way to tag each acronym as I
create it and then autogenerate a LIST OF ACRONYMS by pulling
together all of the tagged acronyms into a table? Even better, it
would be cool if the acronym definition will also get pulled as
part of a different tag for placement in a separate table column.
Any ideas will be appreciated.






  #11   Report Post  
Posted to microsoft.public.word.docmanagement
irjic irjic is offline
external usenet poster
 
Posts: 3
Default Autogenerated Acronyms List?

I'm not sure how to do this. How do you add a unique style as stated in the
4th line?


"Al" wrote:

Here is a way of finding all acronyms in a document:

Do a find/Replace with wildcards:
Find [A-Z]{2,}
This is Beginning of word, at least 2 chars A-Z, end of word
Replace with: ~^p^&^p and a unique style not found in document. (the
tilde is an unused character in document) (I use Body Text 2)
Then do a Find ~^p style Body Text 2
Replace with ^p style Normal.
The result is a paragraph with each acronym with a unique style.
Then Insert a List of figures at the top of the document using Style Body
Text 2.
Copy the List of Figures, sort and delete duplicates.


"Graham Mayor" wrote in
:

'Autogenerated' is asking a lot, but you can easily copy selected
Acronyms to a table for later creation into a list with a simple
macro. Create a two column/one row empty table. Put the cursor below
the table and save it. Substitute the name and path for the filename
in the following macro.



  #12   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Autogenerated Acronyms List?

In the Replace dialog, click the More button to display the bottom
half. Click in the Replace With box, then click the Format button and
choose Style from the menu. In the Style dialog, choose some style (Al
suggested Body Text 2) that isn't used anywhere else in the document,
and click OK. The text below the Replace With box will now show the
style you chose, and it will be applied to each find.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Wed, 11 Jul 2007 14:06:01 -0700, irjic
wrote:

I'm not sure how to do this. How do you add a unique style as stated in the
4th line?


"Al" wrote:

Here is a way of finding all acronyms in a document:

Do a find/Replace with wildcards:
Find [A-Z]{2,}
This is Beginning of word, at least 2 chars A-Z, end of word
Replace with: ~^p^&^p and a unique style not found in document. (the
tilde is an unused character in document) (I use Body Text 2)
Then do a Find ~^p style Body Text 2
Replace with ^p style Normal.
The result is a paragraph with each acronym with a unique style.
Then Insert a List of figures at the top of the document using Style Body
Text 2.
Copy the List of Figures, sort and delete duplicates.


"Graham Mayor" wrote in
:

'Autogenerated' is asking a lot, but you can easily copy selected
Acronyms to a table for later creation into a list with a simple
macro. Create a two column/one row empty table. Put the cursor below
the table and save it. Substitute the name and path for the filename
in the following macro.



  #13   Report Post  
Posted to microsoft.public.word.docmanagement
irjic irjic is offline
external usenet poster
 
Posts: 3
Default Autogenerated Acronyms List?

Reports that 0 found. Is this because they are in my dictionary?

"Jay Freedman" wrote:

In the Replace dialog, click the More button to display the bottom
half. Click in the Replace With box, then click the Format button and
choose Style from the menu. In the Style dialog, choose some style (Al
suggested Body Text 2) that isn't used anywhere else in the document,
and click OK. The text below the Replace With box will now show the
style you chose, and it will be applied to each find.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Wed, 11 Jul 2007 14:06:01 -0700, irjic
wrote:

I'm not sure how to do this. How do you add a unique style as stated in the
4th line?


"Al" wrote:

Here is a way of finding all acronyms in a document:

Do a find/Replace with wildcards:
Find [A-Z]{2,}
This is Beginning of word, at least 2 chars A-Z, end of word
Replace with: ~^p^&^p and a unique style not found in document. (the
tilde is an unused character in document) (I use Body Text 2)
Then do a Find ~^p style Body Text 2
Replace with ^p style Normal.
The result is a paragraph with each acronym with a unique style.
Then Insert a List of figures at the top of the document using Style Body
Text 2.
Copy the List of Figures, sort and delete duplicates.


"Graham Mayor" wrote in
:

'Autogenerated' is asking a lot, but you can easily copy selected
Acronyms to a table for later creation into a list with a simple
macro. Create a two column/one row empty table. Put the cursor below
the table and save it. Substitute the name and path for the filename
in the following macro.



  #14   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Autogenerated Acronyms List?

No, finding and replacing has nothing at all to do with what's in your
dictionary.

I think you missed or misinterpreted Al's reference to doing a
"wildcard" search. That means that after you click the More button,
you need to check the box in the lower left that says "Use wildcards".
That's in addition to all the other things you need to set up in the
dialog.

For more about wildcard searches, see
http://www.gmayor.com/replace_using_wildcards.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Wed, 11 Jul 2007 14:44:02 -0700, irjic
wrote:

Reports that 0 found. Is this because they are in my dictionary?

"Jay Freedman" wrote:

In the Replace dialog, click the More button to display the bottom
half. Click in the Replace With box, then click the Format button and
choose Style from the menu. In the Style dialog, choose some style (Al
suggested Body Text 2) that isn't used anywhere else in the document,
and click OK. The text below the Replace With box will now show the
style you chose, and it will be applied to each find.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Wed, 11 Jul 2007 14:06:01 -0700, irjic
wrote:

I'm not sure how to do this. How do you add a unique style as stated in the
4th line?


"Al" wrote:

Here is a way of finding all acronyms in a document:

Do a find/Replace with wildcards:
Find [A-Z]{2,}
This is Beginning of word, at least 2 chars A-Z, end of word
Replace with: ~^p^&^p and a unique style not found in document. (the
tilde is an unused character in document) (I use Body Text 2)
Then do a Find ~^p style Body Text 2
Replace with ^p style Normal.
The result is a paragraph with each acronym with a unique style.
Then Insert a List of figures at the top of the document using Style Body
Text 2.
Copy the List of Figures, sort and delete duplicates.


"Graham Mayor" wrote in
:

'Autogenerated' is asking a lot, but you can easily copy selected
Acronyms to a table for later creation into a list with a simple
macro. Create a two column/one row empty table. Put the cursor below
the table and save it. Substitute the name and path for the filename
in the following macro.



  #15   Report Post  
Posted to microsoft.public.word.docmanagement
irjic irjic is offline
external usenet poster
 
Posts: 3
Default Autogenerated Acronyms List?

Still finding none. Guess its back to find and copy. Thanks for your efforts.

"Jay Freedman" wrote:

No, finding and replacing has nothing at all to do with what's in your
dictionary.

I think you missed or misinterpreted Al's reference to doing a
"wildcard" search. That means that after you click the More button,
you need to check the box in the lower left that says "Use wildcards".
That's in addition to all the other things you need to set up in the
dialog.

For more about wildcard searches, see
http://www.gmayor.com/replace_using_wildcards.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Wed, 11 Jul 2007 14:44:02 -0700, irjic
wrote:

Reports that 0 found. Is this because they are in my dictionary?

"Jay Freedman" wrote:

In the Replace dialog, click the More button to display the bottom
half. Click in the Replace With box, then click the Format button and
choose Style from the menu. In the Style dialog, choose some style (Al
suggested Body Text 2) that isn't used anywhere else in the document,
and click OK. The text below the Replace With box will now show the
style you chose, and it will be applied to each find.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Wed, 11 Jul 2007 14:06:01 -0700, irjic
wrote:

I'm not sure how to do this. How do you add a unique style as stated in the
4th line?


"Al" wrote:

Here is a way of finding all acronyms in a document:

Do a find/Replace with wildcards:
Find [A-Z]{2,}
This is Beginning of word, at least 2 chars A-Z, end of word
Replace with: ~^p^&^p and a unique style not found in document. (the
tilde is an unused character in document) (I use Body Text 2)
Then do a Find ~^p style Body Text 2
Replace with ^p style Normal.
The result is a paragraph with each acronym with a unique style.
Then Insert a List of figures at the top of the document using Style Body
Text 2.
Copy the List of Figures, sort and delete duplicates.


"Graham Mayor" wrote in
:

'Autogenerated' is asking a lot, but you can easily copy selected
Acronyms to a table for later creation into a list with a simple
macro. Create a two column/one row empty table. Put the cursor below
the table and save it. Substitute the name and path for the filename
in the following macro.




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make a list of acronyms in a report Kofikakraba Microsoft Word Help 2 March 28th 06 06:29 PM
Verifying Acronyms Bill Microsoft Word Help 0 February 7th 06 06:17 PM
how do I make a list of acronyms? SoWrite Microsoft Word Help 3 December 7th 05 12:10 AM
acronyms mapper39 Microsoft Word Help 1 April 18th 05 08:39 PM
finding acronyms and abbreviations Nancyz Microsoft Word Help 8 January 12th 05 05:26 AM


All times are GMT +1. The time now is 03:52 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"