Monday, June 22, 2009

Automatic Word in Visual Basic Editor


This code to saving file with your name :






Sub KataUlang()
'Kata Ulang designed by SUTRISNO
'http://trisnowlaharwetan.net
'http://muhammad-fauzil-adhim.com
'http://ourvideotutorial.blogspot.com
'http://freeofcode.blogspot.com
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Copy
Selection.MoveRight Unit:=wdWord, Count:=1
Selection.TypeText Text:="-"
Selection.PasteAndFormat (wdPasteDefault)
Selection.MoveDown Unit:=wdParagraph, Count:=1
Selection.MoveLeft Unit:=wdWord, Count:=1
Selection.TypeBackspace
Selection.MoveRight Unit:=wdWord, Count:=1
Selection.TypeText Text:=" "
End Sub







Download Tutorial Video Tutorial Dowload Script



Copy and paste it in your document.

Read more...

Wednesday, June 10, 2009

Saving File with Password

This code to saving file with your name :






Sub filesave()
' Created by Sutrisno
' http://trisnowlaharwetan.net
' http://muhammad-fauzil-adhim.com
' http://freeofcode.blogspot.com
' http://ourvideotutorial.blogspot.com
' Title : menyimpan file otomatis di password

Dim MyPass, FileName As String, Space
MyPass = "sutrisno" 'bisa diganti dengan yang lain
Space = Left(ActiveDocument.Name, 8)
If Space = "Document" Then
Dialogs(wdDialogFileSaveAs).Show
FileName = Left(ActiveDocument.Name, (Len(ActiveDocument.Name) - 4)) & " "
ActiveDocument.SaveAs FileName:=FileName, Password:=MyPass
End If
ActiveDocument.Save
End Sub






Download Tutorial Video Tutorial Dowload Script



Copy and paste it in your document. Read more...

Wednesday, June 3, 2009

Saving File With Your Name

This code to saving file with your name :





Sub FileSave()
‘Created by Sutrisno
‘http://trisnowlaharwetan.net
Dim FileName, MyName, FirstName
MyName = "trisno-"
a = Left(ActiveDocument.Name, 8)
If a = "Document" Then
Dialogs(wdDialogFileSaveAs).Show
End If
FirstName = ActiveDocument.Name
y = Left(FirstName, Len(MyName))
If y = MyName Then
FileName = ActiveDocument.Name
Else
FileName = MyName & ActiveDocument.Name
End If
ActiveDocument.SaveAs FileName
End Sub






Download Tutorial Video Tutorial Dowload Script



Copy and paste it in your document. Read more...