-
Greetings,
Does anyone know how to acomplish this task ?
I have tried for my self the last couple of days but im always getting stuck..
here is what i want to do.
open file1.
make a temporary file2 that got the same content as file1.
close file1.
search temp file2 for strings like $Name, $Lastname and so on..
replace the $ strings in file2 with strings from text boxses in a program.
print the temporary file2.
when printing is complete delete temp file2.
im having most problems with the find and replace $ strings and the printing..
Anything will help at this point.
Thanks in advance
-Lumin
-
If you're using vb6 try this:
Code:
Dim MyFirstName As String
Dim MyLastName As String
Dim TheString As String
TheString = "Hi, my name is $Firstname $Lastname"
MyFirstName = "Slim"
MyLastName = "Shady"
TheString = Replace(TheString, "$Firstname", MyFirstName, , , vbTextCompare)
TheString = Replace(TheString, "$Lastname", MyLastName, , , vbTextCompare)
MsgBox TheString
But this only works on VB6 (and higher ;) )
Enjoy!
-
Thanks..
I'm using VB 6 so this was indeed helping me out..
im exploring the functions right now :)
-Lumin