#1   Report Post  
Posted to microsoft.public.word.docmanagement
Kemp[_2_] Kemp[_2_] is offline
external usenet poster
 
Posts: 1
Default Userform and MS Word

I was wondering if it is possible to use a userform to fill in blanks on a
word file. Here what I am trying to do. I have a piece of script that I want
to be able to populte and copy. I am adding radio stations to an online radio
and to add stations I need to add this script for each station Example:

station url="http://85.12.7.2:8000" ---want to add http address
nameDEFJAY/name ---want to add name
genreRnB/genre ---want to add genre
/station
I want to be able to use the userform to populate the http address, name and
genre. So I would fill the boxes and click a button that would save this
script with the information. Everytime I enter the information it would add
another script entry
Example:
station url="http://85.12.7.2:8000"
nameDEFJAY/name
genreRnB/genre
station url="http://123.32.7.2:8080"
nameCrazy7/name
genreHeavy Metal/genre
station url="http://124.08.63.9:3000"
nameWhisper92/name
genreSoft Rock/genre
So when I am done I have a list that I can copy and paste into my site. I
hope this made sense. Is this possible? and if so how? I am a newbie when it
come to this stuff. Thank you for any insight :0)

Kemp
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Userform and MS Word

I would probably use a directory type mail merge and enter the data into the
data source file, which could be an Excel spreadsheet or a table in a word
document. You may however already have the information in some source file
that could be used.

--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.

"Kemp" wrote in message
news
I was wondering if it is possible to use a userform to fill in blanks on a
word file. Here what I am trying to do. I have a piece of script that I
want
to be able to populte and copy. I am adding radio stations to an online
radio
and to add stations I need to add this script for each station Example:

station url="http://85.12.7.2:8000" ---want to add http address
nameDEFJAY/name ---want to add name
genreRnB/genre ---want to add genre
/station
I want to be able to use the userform to populate the http address, name
and
genre. So I would fill the boxes and click a button that would save this
script with the information. Everytime I enter the information it would
add
another script entry
Example:
station url="http://85.12.7.2:8000"
nameDEFJAY/name
genreRnB/genre
station url="http://123.32.7.2:8080"
nameCrazy7/name
genreHeavy Metal/genre
station url="http://124.08.63.9:3000"
nameWhisper92/name
genreSoft Rock/genre
So when I am done I have a list that I can copy and paste into my site. I
hope this made sense. Is this possible? and if so how? I am a newbie when
it
come to this stuff. Thank you for any insight :0)

Kemp


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Userform and MS Word

As Doug suggests, much depends on where your source of the information is
located. It would certainly be possible to create a userform with three
fields to collect the data and write it with the tags into a document. For
the basics, see Word MVP FAQ - Userforms
http://word.mvps.org/FAQs/Userforms.htm

for a more in depth explanation, see
http://gregmaxey.mvps.org/Create_and...a_UserForm.htm

But it might be quicker to enter the information in a three column table and
use mail merge to produce the list (as Doug suggests). Or if you have the
information in a list already you could either use mail merge or vba to
format the list to add the tags.

The most basic code for a userform using default field names would be

Private sURL As String
Private sName As String
Private sGenre As String
Private Sub CommandButton1_Click()
sURL = TextBox1.Value
sName = TextBox2.Value
sGenre = TextBox3.Value
ActiveDocument.Range.InsertAfter "station url=""" & sURL & _
"""" & vbCr & "name" & sName & "/name" & vbCr & _
"genre" & sGenre & "/genre" & vbCr
Unload Me
End Sub


--

Graham Mayor - Word MVP

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



Kemp wrote:
I was wondering if it is possible to use a userform to fill in blanks
on a word file. Here what I am trying to do. I have a piece of script
that I want to be able to populte and copy. I am adding radio
stations to an online radio and to add stations I need to add this
script for each station Example:

station url="http://85.12.7.2:8000" ---want to add http address
nameDEFJAY/name ---want to add name
genreRnB/genre ---want to add genre
/station
I want to be able to use the userform to populate the http address,
name and genre. So I would fill the boxes and click a button that
would save this script with the information. Everytime I enter the
information it would add another script entry
Example:
station url="http://85.12.7.2:8000"
nameDEFJAY/name
genreRnB/genre
station url="http://123.32.7.2:8080"
nameCrazy7/name
genreHeavy Metal/genre
station url="http://124.08.63.9:3000"
nameWhisper92/name
genreSoft Rock/genre
So when I am done I have a list that I can copy and paste into my
site. I hope this made sense. Is this possible? and if so how? I am a
newbie when it come to this stuff. Thank you for any insight :0)

Kemp



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
Word 2003 - Where does Word store Userform code? Congenital Kano Page Layout 1 October 15th 09 09:26 PM
a Word 2003 toolbar into a 2007 UserForm? gil Microsoft Word Help 2 August 29th 09 02:34 PM
Check Boxes in a UserForm (Word 2007) Trefilov22 Microsoft Word Help 6 May 23rd 07 07:38 PM
Userform Sharpe Microsoft Word Help 1 March 17th 06 06:13 AM
Userform in word SuzieQ Microsoft Word Help 2 December 12th 05 09:42 PM


All times are GMT +1. The time now is 11:59 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"