Results 1 to 10 of 110

Thread: Notes tests, string, manipulation of text files and string manipulations

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,316
    Rep Power
    10
    Some extended notes for this main forum post
    https://eileenslounge.com/viewtopic....a7d27b#p315620
    https://eileenslounge.com/viewtopic.php?p=315620&sid=922f8eb190547f727ca48c954aa7d27b#p315620
    This is post
    https://www.excelfox.com/forum/showt...ll=1#post24092
    https://www.excelfox.com/forum/showthread.php/2860-Notes-tests-string-manipulation-of-text-files-and-string-manipulations?p=24092&viewfull=1#post24092







    This particular post is intended just to reproduce , for later clarity , some things in the original main forum post

    At this point in the proceedings I had got to approximately these posts, or thereabouts . https://eileenslounge.com/viewtopic....315596#p315596
    https://eileenslounge.com/viewtopic....315512#p315512
    and the coding I was using was in **essence this following, ( ** changed just slightly to make comparisons with the next two post , ( https://www.excelfox.com/forum/showt...ll=1#post24094 https://www.excelfox.com/forum/showt...ll=1#post24093 ) , easier

    Those last two Eileen’s Lounge links, https://eileenslounge.com/viewtopic....315596#p315596
    https://eileenslounge.com/viewtopic....315512#p315512
    , sum up well what I was doing and this coding version of mine is a good summary of a shortened version of my main coding ideas, ( I have farmed out the BB Code tag making part to another routine, as that is not the main point of the current discussions. The main point of the current discussions is the getting of the appropriate URL to match a highlight key word in Microsoft Word)

    Code:
    Sub BBCodeTagsURL_()  '     https://eileenslounge.com/viewtopic.php?p=315503#p315503  https://www.excelfox.com/forum/showthread.php/2860-Notes-tests-string-manipulation-of-text-files-and-string-manipulations?p=24092&viewfull=1#post24092
    Rem 0  The text you selected
    Dim SelTxt As String
     Let SelTxt = Selection.Text ' A text I highlighted in Word
    
    Rem 1 Some groups of   name, URL,   pairs
    Dim strItAll As String, strEileen As String, strFox As String
     Let strEileen = "Eileen's Lounge, https://eileenslounge.com/app.php/portal, eileenslounge, https://eileenslounge.com/app.php/portal, The Windows Clipboard, https://www.eileenslounge.com/viewtopic.php?p=300947#p300947, "
     Let strFox = "Excel Fox, https://www.excelfox.com/forum/forum.php, excelfox, https://www.excelfox.com/forum/forum.php, "
     
     Let strItAll = strEileen & strFox
    
    Rem 2 Find the URL if there is one
    Dim strURL As String
            If InStr(1, strItAll, SelTxt, vbTextCompare) > 0 Then
         Let strURL = Mid(strItAll, InStr(InStr(1, strItAll, SelTxt, vbTextCompare), strItAll, "http", vbBinaryCompare), InStr(InStr(InStr(1, strItAll, SelTxt, vbTextCompare), strItAll, "http", vbBinaryCompare), strItAll, ",", vbBinaryCompare) - InStr(InStr(1, strItAll, SelTxt, vbTextCompare), strItAll, "http", vbBinaryCompare))
        Else
         Let strURL = ""
        End If
    
    Rem 3 Make the BB Code Tag URL thing
    Call MakeABBCodeTagURL(strURL)
    
    End Sub
    Sub MakeABBCodeTagURL(ByVal strURL As String) ' https://www.excelfox.com/forum/showthread.php/2860-Notes-tests-string-manipulation-of-text-files-and-string-manipulations?p=24092&viewfull=1#post24092
        With Selection
         .Text = "[URL=" & strURL & "] " & .Text & " [/url]"
         .Collapse Direction:=wdCollapseEnd
         .Font.Color = wdColorAutomatic
        End With
    End Sub
    Last edited by DocAElstein; 03-27-2024 at 10:52 PM.

Similar Threads

  1. Replies: 114
    Last Post: 03-04-2024, 02:39 PM
  2. Replies: 4
    Last Post: 10-02-2022, 09:18 PM
  3. Replies: 4
    Last Post: 01-30-2022, 04:05 PM
  4. Replies: 0
    Last Post: 07-08-2020, 04:29 PM
  5. string manipulation
    By kylefoley76 in forum Excel Help
    Replies: 5
    Last Post: 02-20-2014, 12:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •