Skip to main content
Inspiring
February 7, 2008
Question

Syntex help required

  • February 7, 2008
  • 4 replies
  • 351 views
Can someone help with the syntex on this please?

I'm using CDONTS to send emails.
For the Body of the email im using the code below:
The bodystring is made up from the form fields.

ActionID: (RSLast.Fields.Item("ActionID").Value) & BodyString

When i use the code, i get this error
Microsoft VBScript compilation (0x800A0401)
Expected end of statement

If i remove the ActionID: text all works well.

I know im close but how to i write the correct syntex ?

Thanks
Andy




This topic has been closed for replies.

4 replies

Inspiring
February 8, 2008
Andy,

That is the ActionID?

Do you have a field in that table that actually contains the URL?

--
Ken Ford
Adobe Community Expert - Dreamweaver
Fordwebs, LLC
http://www.fordwebs.com


"Andy" <andy@work.com> wrote in message
news:fohgqm$4d8$2@forums.macromedia.com...
> Hi Ken -
> Thanks for taking the time to help out.
> I'm afraid the code didn't quite work. The result i got in the email was
>
> ActionID: <a href='232'>232</a>
> Thanks
>
> Andy
>
>
> "Ken Ford - *ACE*" <newsgroups1@fordwebs.com> wrote in message
> news:fofb4j$l51$1@forums.macromedia.com...
>> Try something like this (all on one line):
>>
>> objCDO.Body = "ActionID: <a href='" &
>> (RSLast.Fields.Item("ActionID").Value) & "'>" &
>> (RSLast.Fields.Item("ActionID").Value) & "</a>" & BodyString
>>
>>
>> --
>> Ken Ford
>> Adobe Community Expert - Dreamweaver
>> Fordwebs, LLC
>> http://www.fordwebs.com
>>
>>
>> "Andy" <andy@work.com> wrote in message
>> news:fofam0$kii$2@forums.macromedia.com...
>>> OK - I have it working :-)
>>> objCDO.Body = "ActionID: " & (RSLast.Fields.Item("ActionID").Value) &
>>> BodyString
>>>
>>> But now i need to have a link from the ActionID - So something like
>>>
>>> objCDO.Body = "ActionID: " & <a
>>> href="(RSLast.Fields.Item("ActionID").Value)"><%=(RSLast.Fields.Item("ActionID").Value)%></a>
>>> & BodyString
>>>
>>> But this doesn't work :-(
>>>
>>> Help!
>>>
>>>
>>> "Andy" <andy@work.com> wrote in message
>>> news:fof815$hn8$2@forums.macromedia.com...
>>>> Can someone help with the syntex on this please?
>>>>
>>>> I'm using CDONTS to send emails.
>>>> For the Body of the email im using the code below:
>>>> The bodystring is made up from the form fields.
>>>>
>>>> ActionID: (RSLast.Fields.Item("ActionID").Value) & BodyString
>>>>
>>>> When i use the code, i get this error
>>>> Microsoft VBScript compilation (0x800A0401)
>>>> Expected end of statement
>>>>
>>>> If i remove the ActionID: text all works well.
>>>>
>>>> I know im close but how to i write the correct syntex ?
>>>>
>>>> Thanks
>>>> Andy
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>
>

Inspiring
February 8, 2008
Hi Ken -
Thanks for taking the time to help out.
I'm afraid the code didn't quite work. The result i got in the email was

ActionID: <a href='232'>232</a>
Thanks

Andy


"Ken Ford - *ACE*" <newsgroups1@fordwebs.com> wrote in message
news:fofb4j$l51$1@forums.macromedia.com...
> Try something like this (all on one line):
>
> objCDO.Body = "ActionID: <a href='" &
> (RSLast.Fields.Item("ActionID").Value) & "'>" &
> (RSLast.Fields.Item("ActionID").Value) & "</a>" & BodyString
>
>
> --
> Ken Ford
> Adobe Community Expert - Dreamweaver
> Fordwebs, LLC
> http://www.fordwebs.com
>
>
> "Andy" <andy@work.com> wrote in message
> news:fofam0$kii$2@forums.macromedia.com...
>> OK - I have it working :-)
>> objCDO.Body = "ActionID: " & (RSLast.Fields.Item("ActionID").Value) &
>> BodyString
>>
>> But now i need to have a link from the ActionID - So something like
>>
>> objCDO.Body = "ActionID: " & <a
>> href="(RSLast.Fields.Item("ActionID").Value)"><%=(RSLast.Fields.Item("ActionID").Value)%></a>
>> & BodyString
>>
>> But this doesn't work :-(
>>
>> Help!
>>
>>
>> "Andy" <andy@work.com> wrote in message
>> news:fof815$hn8$2@forums.macromedia.com...
>>> Can someone help with the syntex on this please?
>>>
>>> I'm using CDONTS to send emails.
>>> For the Body of the email im using the code below:
>>> The bodystring is made up from the form fields.
>>>
>>> ActionID: (RSLast.Fields.Item("ActionID").Value) & BodyString
>>>
>>> When i use the code, i get this error
>>> Microsoft VBScript compilation (0x800A0401)
>>> Expected end of statement
>>>
>>> If i remove the ActionID: text all works well.
>>>
>>> I know im close but how to i write the correct syntex ?
>>>
>>> Thanks
>>> Andy
>>>
>>>
>>>
>>>
>>
>>
>


Inspiring
February 7, 2008
Try something like this (all on one line):

objCDO.Body = "ActionID: <a href='" & (RSLast.Fields.Item("ActionID").Value)
& "'>" & (RSLast.Fields.Item("ActionID").Value) & "</a>" & BodyString


--
Ken Ford
Adobe Community Expert - Dreamweaver
Fordwebs, LLC
http://www.fordwebs.com


"Andy" <andy@work.com> wrote in message
news:fofam0$kii$2@forums.macromedia.com...
> OK - I have it working :-)
> objCDO.Body = "ActionID: " & (RSLast.Fields.Item("ActionID").Value) &
> BodyString
>
> But now i need to have a link from the ActionID - So something like
>
> objCDO.Body = "ActionID: " & <a
> href="(RSLast.Fields.Item("ActionID").Value)"><%=(RSLast.Fields.Item("ActionID").Value)%></a>
> & BodyString
>
> But this doesn't work :-(
>
> Help!
>
>
> "Andy" <andy@work.com> wrote in message
> news:fof815$hn8$2@forums.macromedia.com...
>> Can someone help with the syntex on this please?
>>
>> I'm using CDONTS to send emails.
>> For the Body of the email im using the code below:
>> The bodystring is made up from the form fields.
>>
>> ActionID: (RSLast.Fields.Item("ActionID").Value) & BodyString
>>
>> When i use the code, i get this error
>> Microsoft VBScript compilation (0x800A0401)
>> Expected end of statement
>>
>> If i remove the ActionID: text all works well.
>>
>> I know im close but how to i write the correct syntex ?
>>
>> Thanks
>> Andy
>>
>>
>>
>>
>
>

Inspiring
February 7, 2008
OK - I have it working :-)
objCDO.Body = "ActionID: " & (RSLast.Fields.Item("ActionID").Value) &
BodyString

But now i need to have a link from the ActionID - So something like

objCDO.Body = "ActionID: " & <a
href="(RSLast.Fields.Item("ActionID").Value)"><%=(RSLast.Fields.Item("ActionID").Value)%></a>
& BodyString

But this doesn't work :-(

Help!


"Andy" <andy@work.com> wrote in message
news:fof815$hn8$2@forums.macromedia.com...
> Can someone help with the syntex on this please?
>
> I'm using CDONTS to send emails.
> For the Body of the email im using the code below:
> The bodystring is made up from the form fields.
>
> ActionID: (RSLast.Fields.Item("ActionID").Value) & BodyString
>
> When i use the code, i get this error
> Microsoft VBScript compilation (0x800A0401)
> Expected end of statement
>
> If i remove the ActionID: text all works well.
>
> I know im close but how to i write the correct syntex ?
>
> Thanks
> Andy
>
>
>
>