---
title: "aspSmartImage -- addText"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/111101-aspsmartimage-addtext"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "Eclipse"
published: "2004-09-08T14:06:51.000Z"
updated: "2004-09-09T07:50:07.000Z"
replies: 3
views: 216
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/asp/111101-aspsmartimage-addtext"
---

# aspSmartImage -- addText

## #1 — Eclipse, 2004-09-08T14:06Z

```
Detta fungerar:

oSmartImage.FontFace = strImageFontFace
oSmartImage.FontColor = strImageFontColor
oSmartImage.AddText  [b]"Test me!!"[/b], strVAlign, strHalign

Detta fungerar inte:

oSmartImage.FontFace = strImageFontFace
oSmartImage.FontColor = strImageFontColor
oSmartImage.AddText  [b]strImageText[/b], strVAlign, strHalign
```

Förslag på alternativ?

Permalänk: https://www.webforum.nu/p/111101

## #2 — Eclipse, 2004-09-09T07:09Z

```
Lite relevant kod
' ## ADD TEXT
IF strImageText <> "" THEN
response.write strImageText & "<BR>"  & typeName(strImageText)
	oSmartImage.FontFace = strImageFontFace
	oSmartImage.FontColor = strImageFontColor
	oSmartImage.FontBold = bolBold
'	oSmartImage.AddText  "Test me!!", strVAlign, strHAlign
	oSmartImage.AddText  strImageText, strVAlign, strHAlign
END IF

Felmeddelande:

this is a test...
String 

Microsoft VBScript runtime error '800a000d' 

Type mismatch: 'AddText' 

/admin/company/aspSmart_confirm.asp, line 104
```

Permalänk: https://www.webforum.nu/p/1433740

## #3 — @nders, 2004-09-09T07:14Z

vad innehåller *strVAlign* och *strHAlign*?

Edit: glöm det förresten, det verkar som att jag missförstod problemet i en första anblick. 

mvh

Permalänk: https://www.webforum.nu/p/1433741

## #4 — Eclipse, 2004-09-09T07:50Z

```
Detta funkar!

' ## ADD TEXT
IF strImageText <> "" THEN
response.write strImageText & "<BR>"  & typeName(strImageText)
	oSmartImage.FontFace = strImageFontFace
	oSmartImage.FontColor = strImageFontColor
	oSmartImage.FontBold = bolBold
'	oSmartImage.AddText  "Test me!!", strVAlign, strHAlign
	oSmartImage.AddText  [b]CStr(strImageText)[/b], strVAlign, strHAlign
END IF

Anders:
oSmartImage.AddText  "Test me!!", "TOP", "RIGHT"
```

Permalänk: https://www.webforum.nu/p/1433761

---

Tråden på webben: https://www.webforum.nu/amne/asp/111101-aspsmartimage-addtext
