I am using the VB editor within Microsoft Outlook to make an attachment stripper. I am trying to insert hyperlink to the location of where the file was saved to within the body of the email. I am having problems with file names containing spaces.
Does anyone know how to do this?
I tried to use the following line of code
StrmyFileLocation = "C:\Documents and Settings\rlellis\My Documents\<file name here>
myItem.Body = myItem.Body & "file://" & StrmyFileLocation
The problem is that this creates a hyperlink but only to the point where there is a space. Therefore everything after "Documents" in the string does not get converted into the link.
I found out that whan you manually type file://filename within quotation marks the spaces are recognized.
However it doesn't seem to work when inserting a string in quotes in a VB macro as shown below:
myItem.Body = myItem.Body & Chr(34) & "file://" & StrmyFileLocation & Chr(34)
Everything after the space is not recognized.
Does anyone know how to do this?
I tried to use the following line of code
StrmyFileLocation = "C:\Documents and Settings\rlellis\My Documents\<file name here>
myItem.Body = myItem.Body & "file://" & StrmyFileLocation
The problem is that this creates a hyperlink but only to the point where there is a space. Therefore everything after "Documents" in the string does not get converted into the link.
I found out that whan you manually type file://filename within quotation marks the spaces are recognized.
However it doesn't seem to work when inserting a string in quotes in a VB macro as shown below:
myItem.Body = myItem.Body & Chr(34) & "file://" & StrmyFileLocation & Chr(34)
Everything after the space is not recognized.