Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-27-2016, 09:56 AM
dwirony dwirony is offline How to Dim a substring between two strings Windows 7 64bit How to Dim a substring between two strings Office 2003
Advanced Beginner
How to Dim a substring between two strings
 
Join Date: Oct 2016
Posts: 49
dwirony will become famous soon enough
Default How to Dim a substring between two strings

Hello all,



I am trying to Dim some text as a variable for another macro of mine. For example, the value I want to Dim is located between the words "to host the" and "group at the location". Once I have the variable, I want to use it to fill in other paragraphs throughout my document, something like this -

Code:
With Selection.Find
        .Text = "The event is to be held with the designated group at the location"
        .Replacement.Text = "The event is to be held with the " & Dim VARIABLE & " group at the location"
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
Any solutions to how I could go about this?
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to substring and trim in excel Mahesh G Excel 0 08-16-2016 06:03 AM
Substring to return numbers funkyfido Excel 4 07-22-2016 10:03 AM
How to Dim a substring between two strings How to link similar strings. PRA007 Word VBA 2 01-20-2016 04:22 AM
How to Dim a substring between two strings Search with multiple strings silverspr Excel 7 03-03-2013 04:45 PM
How to Dim a substring between two strings update style of all strings available between two specific strings vikrantkale Word 1 03-28-2011 06:13 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:28 PM.


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