Link to home
Start Free TrialLog in
Avatar of Jegajothy vythilingam
Jegajothy vythilingamFlag for United States of America

asked on

MS Access - samile code to paste the password onto a web page

My OS is win 7 64 bit and I use Office 365 and MS Access where I have a simple db to store the passwords for the various sites.  /while I have a field to store the url link for the login page and another button to copy the password, but ideally I would like to paste the password by code onto the page's password field.  Has anyone the vb code to do it and could share. thanks.
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

There will be no single method to do this, and many sites have - for security reasons and to prevent spamming - made a lot of steps to limit or even prohibit the option to automate pasting of the password or the full credentials.
This is precisely the kind of thing that websites try so hard to guard against.  Good luck.....
SOLUTION
Avatar of Daniel Pineault
Daniel Pineault

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
He Je:  The methods in Daniel's link works.  
I had to loop thru the login page forms collection and form elements collection to find the names of the username & password textboxes, plus the submit button name, but I was able to successfully login to Wikipedia automatically using the code in Daniels link.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
p.s.  Daniels deserves all the credit for this one....
Instead of automating IE, wich isn't the most realiable way (what if the targeted web page's content is updated ?), you might be interrested in web services (according the web site provide them).
Fabrice mentions another avenue, but it depends on whether or not the websites are "cooperating" sites that will set you up with a way to use code to logon to the site.  So far we have only covered "non-cooperative" means to logon.
Maybe consider a different approach to do the same thing. Use a free password manager such as LastPass and they have done all the programming for you.

Good luck...