Pages: 1
RSS
How can I get the logged in users name to appear as a macro?
 
I have been trying to figure this out for the last hour and am stumped.

I have a couple user that login and use the TB and everyone can reply to emails in the main account, however when they do I want a personal name on the bottom of the email so if the customer calls they know who to talk to and that way it will save time walking about the shop asking people if they know anything about what the customer is talking about.

Under the main folder settings in the reply to we have the signature; is there an easy macro to have the logged in user's display name show up?
 
no straight way, but it's possible with some extra steps.

Create a folder like C:\test\ and make sure 'Everyone' user has 'Full Control' permissions on it.
(right click the folder, Properties -> Security tab, add Everyone , set full control)
Create a .bat file, like C:\user.bat, with the following content:
echo %username% >c:\test\user.txt

In the task scheduler, create a scheduled task to execute C:\user.bat at logon

This way each time someone logs on, c:\test\user.txt will be overwritten to contain the username of the logged user

Finally, include the text from c:\test\user.txt with a macro like
%put('C:\Test\user.txt')%-
 
Interested Bigg One, thanks for the info...However I think I might have wrote my question a little wrong and made it more confusing then it should have been.

What we are trying to accomplish is we have 3 workstations here (3 seperated computers) and 1 server for all the files. We have the central email folder on \\server\j$\storage\email data\ those are all mapped to a drive on each of the computers. Lets say we open TB! on two of those workstations and checked the email from one of the computers and then go to the other computer and close TB!. When the TB! is closed it freezes up the program....This will happen to whatever workstation is trying to close TB! while it is open elsewhere.

I'm not even sure it is able to work this way but I know this is how it was setup when I was working for a sign company about 5 years ago. Hope this makes sense....However your post above might come in handy in the near future.
 
I thought it's one machine where different users log.
If they are different things are simpler, on each PC make a file like C:\user.txt and include text from it with the above macro. On each PC, different text will be included.

The problem with freezing has nothing to do with the above question. I myself have used TB that way and it worked without any problems. TheBat (at least v.3.85 that I use) doesn't lock files unless it's doing something with them at the moment. It's possible to delete a message base file even when the account it belongs to is opened. The only situation that may cause a problem is an attempt to simultaneously write to a file from more than one location, and maybe writing from one while reading from another.
In your case it might be a permissions issue, make sure all users (Windows users) who work with TB have read/write access to the common server folder. The easiest would be to set 'Full control' permissions for the 'Everyone' user on that folder and then check if the problem remains. If not, adjust permissions as needed.
Pages: 1