D
Dim
i'm trying to send out email with a hyperlink (path) to a file on a
network.
Email generated from Excel2K using outlook2K.
Problem is that hyperlink contains a space within the path.. when link
is created in a cell it's just fine but when i try to move that link
to the body of a email that where the brake happens:
if that path is created in the cell
"\\ny-gdpcommod-1\Ferm$\Power (space) Operations\filename.xls" and
then i insert that hyperlink into email body through a variable string
or getting value directly from a cell it assumes that hyperlink is
only up to that space between Power and operations
"\\ny-gdpcommod-1\Ferm$\Power "
i'm generating a hyperlink in spreadsheet to a file with the following
code:
With Worksheets("Main")
.Hyperlinks.Add .Range("s5"), _
"\\ny-gdpcommod-1\Ferm$\Power Operations\Test\DailyPosition_" &
Format(dDate, "YYYYMMDD") & ".xls"
End With
and then i'm trying to asign that hyperlink within the body of email:
Set objOutlook = CreateObject("Outlook.Application")
Set objMailItem = objOutlook.CreateItem(olMailItem)
With objMailItem
.Recipients.Add "(e-mail address removed)"
.Body = Sheets("Main").Range("s5")
.send
end with
thanks in advance for a help.
Dim
network.
Email generated from Excel2K using outlook2K.
Problem is that hyperlink contains a space within the path.. when link
is created in a cell it's just fine but when i try to move that link
to the body of a email that where the brake happens:
if that path is created in the cell
"\\ny-gdpcommod-1\Ferm$\Power (space) Operations\filename.xls" and
then i insert that hyperlink into email body through a variable string
or getting value directly from a cell it assumes that hyperlink is
only up to that space between Power and operations
"\\ny-gdpcommod-1\Ferm$\Power "
i'm generating a hyperlink in spreadsheet to a file with the following
code:
With Worksheets("Main")
.Hyperlinks.Add .Range("s5"), _
"\\ny-gdpcommod-1\Ferm$\Power Operations\Test\DailyPosition_" &
Format(dDate, "YYYYMMDD") & ".xls"
End With
and then i'm trying to asign that hyperlink within the body of email:
Set objOutlook = CreateObject("Outlook.Application")
Set objMailItem = objOutlook.CreateItem(olMailItem)
With objMailItem
.Recipients.Add "(e-mail address removed)"
.Body = Sheets("Main").Range("s5")
.send
end with
thanks in advance for a help.
Dim