I need a VBA expert to create a Word/VBA/macro which turns selections in a Word document into dynamic hyperlinks.
Background
- Valid links start wit-h [aA] followed by numeral's
A1683123/ A1686786
A916753
A916753 more text
A916753
more text
- VBA convert a to A
- [login to view URL] Anchor:=r1, Address:= _
"url:objective://id:" + RTrim([login to view URL]) + "@[login to view URL]", SubAddress _
:="", ScreenTip:="", TextToDisplay:=RTrim([login to view URL])
- The issue is, in word, sometimes double clicking "A916753" will select "A916753 ". The hyperlink cannot contain the space. The hyperlink and display text, must only contain the valid text "A916753".
Below is code that doesn't really work:
Dim r1 As Range
Dim str1 As String
Dim a As Integer
Dim b As Integer
Set r1 = [login to view URL]
str1 = Trim([login to view URL])
a = [login to view URL]
b = Len(Trim([login to view URL]))
[login to view URL] Start:=a, End:=a + b
[login to view URL]
' For fiTxtLen = 1 To Len(fsObjLinkText)
' If fiTxtLen = 1 And UCase(Mid(fsObjLinkText, fiTxtLen, 1)) <> "A" Then
' Exit For
' End If
' If fiTxtLen <> 1 And IsNumeric(Mid(fsObjLinkText, fiTxtLen, 1)) <> True Then
' fiTxtLen = fiTxtLen - 1
' Exit For
' End If
' Next fiTxtLen
' If fiTxtLen > 7 Then
' fsObjLinkText = Mid(fsObjLinkText, 1, fiTxtLen)
'[login to view URL] = True
' [login to view URL] = [login to view URL]
' [login to view URL] = [login to view URL] + InStr(foObjLink, "A1683123/") + 2
' [login to view URL]
' Set foObjLinktwo = [login to view URL]
' fsObjLinkTexttwo = [login to view URL]
' End If
' Set foObjLinktwo = [login to view URL]
' fsObjLinkTexttwo = [login to view URL]
'fsObjLinkText = [login to view URL]
'[login to view URL] Start:=[login to view URL], End:=-1
' [login to view URL] -([login to view URL] - 8)
'fsObjLinkTexttwo = [login to view URL]
'[login to view URL] Start:=2, End:=5
' [login to view URL] -([login to view URL] - 8)
'fsObjLinkTextthree = [login to view URL]
Hello,
Hope you doing good. I have gone through your project details and found interesting to me. I am capable to do your project and ready to start. I can provide you quality assurance with 100 percent accuracy in your required time frame. Looking forward to hear from you.
Thank you.