Dim WordApp As Word.Application
Dim AYol As String
AYol = CurrentProject.Path & "\Ustyazı36" & ".doc"
Application.FollowHyperlink AYol, , True, True
On Error Resume Next
Set WordApp = GetObject(, "Word.Application")
On Error GoTo ErrHandler
WordApp.Documents.Open (AYol)
WordApp.Visible = True
WordApp.WindowState = wdWindowStateMaximize
With WordApp.Selection
.Goto what:=wdGoToBookmark, Name:="Ad"
.TypeText BABAADI & " "
.Goto what:=wdGoToBookmark, Name:="dtarih"
.TypeText DOGUMTARIHI & " "
.Goto what:=wdGoToBookmark, Name:="ad2"
.TypeText ADISOYADI & " "
.Goto what:=wdGoToBookmark, Name:="sira"
.TypeText SIRANO
End With
DoEvents
WordApp.Activate
'WordApp.Documents.Save 'Kaydetmek isterseniz tırnağı boşaltınız..
WordApp.Print
Set WordApp = Nothing
Exit Sub
ErrHandler:
Set WordApp = Nothing
Bu kodu denermisiniz....
Bizim için zor diye bir şey yoktur, imkansızsa zaman alır...
Son Düzenleme: 04/06/2011, 20:55, Düzenleyen: DUAYEN.