Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-19-2016, 05:58 PM
kirkm kirkm is offline Help wanted passing data to Form Windows XP Help wanted passing data to Form Office 2003
Advanced Beginner
Help wanted passing data to Form
 
Join Date: Aug 2013
Posts: 40
kirkm is on a distinguished road
Default Help wanted passing data to Form



Code:
Sub ShowPara()
Dim oPara As Paragraph, sText As String, oRng As Range
    For Each oPara In ActiveDocument.Paragraphs
        If oPara.Range.Bold = True Then
            If Not oPara.Range.End = ActiveDocument.Range.End Then
                Set oRng = oPara.Range.Next.Paragraphs(1).Range
                If oRng.Bold = False Then
                    sText = oRng.Text
                    oRng.Select
                    XXXX
                End If
            End If
        End If
    Next oPara
lbl_Exit:
    Exit Sub
End Sub
Using the above code at point XXXX I want
Userform1.Show
and need to pass oRng.text and Opara.Range.Text to the Form (so I can edit them at the Form).

Thanks for any help.
Reply With Quote
  #2  
Old 09-19-2016, 06:16 PM
macropod's Avatar
macropod macropod is offline Help wanted passing data to Form Windows 7 64bit Help wanted passing data to Form Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Why would you want to pass these data to a userform instead of to the Find/Replace dialogue? Editing the data in a userform won't of itself update the document.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 09-19-2016, 06:45 PM
kirkm kirkm is offline Help wanted passing data to Form Windows XP Help wanted passing data to Form Office 2003
Advanced Beginner
Help wanted passing data to Form
 
Join Date: Aug 2013
Posts: 40
kirkm is on a distinguished road
Default

That's most unhelpful Paul. I didn't ask the question to be queried on WHY. This is something I want to know, for a variety of reasons.
Reply With Quote
  #4  
Old 09-19-2016, 06:51 PM
macropod's Avatar
macropod macropod is offline Help wanted passing data to Form Windows 7 64bit Help wanted passing data to Form Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

It seems to me you're wedded to a process, which you've told us about in a piecemeal fashion, without providing a meaningful context. You may regard the reply as unhelpful; from the bits you've deigned to share in a variety of disparate posts, I regard your approach as inefficient...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 09-19-2016, 07:03 PM
kirkm kirkm is offline Help wanted passing data to Form Windows XP Help wanted passing data to Form Office 2003
Advanced Beginner
Help wanted passing data to Form
 
Join Date: Aug 2013
Posts: 40
kirkm is on a distinguished road
Default

No worries, but if someone else could help out, it'd be appreciated
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help wanted passing data to Form passing variable from one sub to another gbrew584 Excel Programming 10 03-21-2016 12:06 AM
Help wanted passing data to Form userform help (having trouble passing info from form to macro) cyraxote Word VBA 16 09-08-2015 04:16 AM
designing a custom outlook form - this form is for only sending mails nt collect data balamuralibm Outlook 0 05-21-2014 08:08 AM
Wanted: Printable List of Built-in Word styles sbianco Word 4 07-21-2012 02:29 PM
Help wanted passing data to Form New Page - When Not Wanted pgrant Word 2 06-07-2012 02:42 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:40 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft