Articles

Metasploit Framework Windows Tutorial
Remote Desktop Connection
Windows Processes That May Be Dangerous
How-To use NetCat a Tutorial
Common Linux Commands
Common Ports
Netcat Commands
HTTP Response Codes
War-Google Hack Terms
Wardriving
Avoiding Social Engineering and Phishing Attacks
Intrusion Detection on Linux
Linux Intrusion Detection
Penetration Testing Guide
Penetration Testing Tools
Social Engineering Fundamentals, Part I: Hacker Tactics
Social engineering (computer security)
The Psychology of Social Engineering

The Archives

General GSO
GovernmentSecurity.org News & Suggestions
In The News
Open Topic
General Security Information
Trash Can
Exploit & Vulnerability Mailing List Archives
Trial Member Forum
Product and Program Reviews GSO Tutorials
System Security
Windows Systems
Beginners Section
Linux & Unix Systems
File Downloads
Exploit Research & Discussion Trojan & Virus Errata
Networking Security / Firewall / IDS / VPN / Routers
System Hardening
E-Mail Security
Wifi Security
Trial Member Uploads
Upload discovered Trojans & Mal ware
GSO Programming Section
C , C++ , VC++
Visual Basic.NET
Perl /CGI
Java/Javascript
PHP/XML/ASP/HTML
Assembly + Other
The Cork Board
Network Security Consultant Directory
Network Security Jobs
The Archives
Encryption Information
General Network Security
Internet Anonymity
HTTP Protocol Security
Linux Security
MS IIS Information
Exploit Articles
Programming / Tool Design
GSO Software Projects
Public Downloads
Microsoft Security Questions and Papers

CuriousCaCA
If anyone is interested in creating a program for word documents then I suggest this.

Open the word document that you are wanting to create a program for and save it as a templeplate. Open the template back up and begin by inserting a bookmark where the data will be place and name it something revelant to the entry of the text that will be placed in it. In this tutorial I will call my bookmark [/B]fname for the entry of the persons first name

(I honestly recommend creating a cell and placing the bookmark in it to avoid on running text that messes up the word doc.)

Press alt + f11 and the visual basic menu should pop up

On the lefthand side you should see a project window
rightclick on the folder that says "Microsoft Word Objects" then click on insert then click userform[B]

a folder has now been created called forms and that is where your visual program will be.

rename the userform to something to your liking for this tutorial I call it "test1"

In the project window click on the Microsoft Word Objects and you should see a file called ThisDocument click on it and a blank window will appear
place this text in the window

'This allows your program to start up when word starts up and open a new document for the program everytime it is opened

Private Sub Document_New()
test1.Show
End Sub

Private Sub Document_New()
Name of your program goes here.Show
End Sub

Now go to the forms folder and open the test1 visual program. At this point is should look like a gray box with nothing on it.

Place a label and text box from the control toolbox onto the visual platform.

Also name the textbox something that is revelant to the information that will be placed in it. In this example call it [B]txt_fname

Now place a command button on the program and change the caption to say whatever you want the button to say in the program. Double click on the button and a blank screen will appear something like this

Private Sub CommandButton1_Click()

End Sub

with in that text place the following command
such as

Private Sub CommandButton1_Click()

With ActiveDocument

.Bookmarks("fname").Range.Text = txt_fname.Value


End With
Unload Me

End Sub

Now you can test the program by press F5 inserting text into your program it should paste the test you entered in your program into the word document.

Also make sure that the macro are disable to run the program

That is the only thing I am causes about with this program. But the program works fine.

I hope this wasn't a waste of anyones time.
myth
nice, but if i may i'd like to add something whilst we're talking about visual basic + word

i cant remember the exact code, but typing it into the visual basic editor provided, should show you what i didnt put in...

Basically this allows you to remove / add / rename / etc etc all the File / View / Tools / Help etc menus

CODE
commandbar("File").controls("Edit").visible = false


I think its something like that, but typing it in and a few trial-and-error work and you'll get it workin, not only can you turn visibility off, but also do anything you want to it, .enabled = false and more...

Adding that to a word's normal.dot, then placing on a computer, well, you can get pretty malicious and be a 'pain in the ass' with it, use to do it at school all the time when i had to use word. Make not, it resets itself after the document is closed, hence the placing in normal.dot and on document load.
CuriousCaCA
I wish I understood exactly what you are talking about myth, I am sorta of new to visual basic, and read alot of tutorials just to get visual basic to talk to word. If you could sort of walk through exactly what you are talking about it would help me alot..
QUOTE(myth @ Jul 20 2005, 01:55 AM)
nice, but if i may i'd like to add something whilst we're talking about visual basic + word

i cant remember the exact code, but typing it into the visual basic editor provided, should show you what i didnt put in...

Basically this allows you to remove / add / rename / etc etc all the File / View / Tools / Help etc menus

CODE
commandbar("File").controls("Edit").visible = false


I think its something like that, but typing it in and a few trial-and-error work and you'll get it workin, not only can you turn visibility off, but also do anything you want to it, .enabled = false and more...

Adding that to a word's normal.dot, then placing on a computer, well, you can get pretty malicious and be a 'pain in the ass' with it, use to do it at school all the time when i had to use word. Make not, it resets itself after the document is closed, hence the placing in normal.dot and on document load.
*


This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2005 Invision Power Services, Inc.