Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


vba to read first line in word doc and put it into inputbox

 
Logged in as: Guest
arrSession:exec spGetSession 2,7,66122
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [General Forum] >> Other Programming/Scripting Languages >> vba to read first line in word doc and put it into inputbox
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 vba to read first line in word doc and put it into inpu... - 11/8/2008 3:16:11 PM   
  dewajtis1

 

Posts: 9
Score: 0
Joined: 7/25/2008
Status: offline
Original message moved by ebgreen
Reason : Moved to proper forum
Hallo,
I have a code belowe. I want first line of text in word (which is always the same) to be read into inputbox.

Sub FindChange()
Dim myStoryRange As Range
Dim p As Paragraphs
Message = "Display text:"
Title = "Text"
Message_1 = "Display text:"
strText = InputBox(Message, Title)
repText = InputBox(Message_1, Title)

With Selection.Find
.Text = strText
.Replacement.Text = repText
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
End With
End Sub
 
 
Post #: 1
 
 RE: vba to read first line in word doc and put it into ... - 11/10/2008 4:45:32 AM   
  ebgreen


Posts: 5251
Score: 31
Joined: 7/12/2005
Status: offline
What currently happens? What is the problem? Are there errors?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to dewajtis1)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [General Forum] >> Other Programming/Scripting Languages >> vba to read first line in word doc and put it into inputbox Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts