How can i write something to file (file.txt)?

Add-in Express™ Support Service
That's what is more important than anything else

How can i write something to file (file.txt)?
How can i write something to file (file.txt)? 
putra n9




Posts: 18
Joined: 2010-11-23
I'm using IEAddin Standard 2010,

I write a code to writing something to file, in XP it running well,
but in Vista nothing happen.

This my code

Dim fs As New FileStream(path + "file.txt", FileMode.Create, FileAccess.Write)
Dim s As New StreamWriter(fs)
s.BaseStream.Seek(0, SeekOrigin.End)
s.Write("This concept is interesting.")
s.Close()

Anybody, help me..

TQ.
Posted 23 Nov, 2010 03:11:43 Top
Andrei Smolin


Add-in Express team


Posts: 14983
Joined: 2006-05-11
Hi putra,

I believe you run IE7 or IE8 on Vista. If so, the issue must be caused by Protected Mode; pay attention to the status bar to verify that assumption. If you have Protected Mode on, then see HowTo: Deal with Protected Mode API in Internet Explorer 7 and IE8.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 23 Nov, 2010 03:35:08 Top
putra n9




Posts: 18
Joined: 2010-11-23
Hi Andrei Smolin,

Thanks for reply. You are correct, i'm run IE8 on Vista. But i not understands the article regarding "HowTo: Deal with Protected Mode API in Internet Explorer 7 and IE8". What should i do exactly? Because i have try the code given which is checking whether Protected Mode On or Off, it running well, but for 2nd code nothing happen. For your information i use IEModule. Any suggestion?

TQ.

putra
beginner user
Posted 23 Nov, 2010 20:53:48 Top
Andrei Smolin


Add-in Express team


Posts: 14983
Joined: 2006-05-11
Hi Putra,

Please read Understanding and Working in Protected Mode Internet Explorer.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 24 Nov, 2010 09:48:44 Top