MyFolder = BrowseFolder("Klasör seçin ... ")
ile klasör seçiyoruz ya
ağ konumu olarak eklediğimiz
Kod:
ftp://192.168.2.6
ftp://192.168.2.6
Option Compare Database
Option Explicit
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Public Function Test()
On Error GoTo Err_Test
'Open file
ShellExecute 0, "Open", "file:///G:\Bulletin Board\UP Billing Flags\UP 1.2 - Health and Safety Plan.doc", "", "", 1
'Print file
ShellExecute 0, "Print", "file:///G:\Bulletin Board\UP Billing Flags\UP 1.2 - Health and Safety Plan.doc", "", "", 0
Exit_Test:
Exit Function
Err_Test:
MsgBox Err.Number & " - " & Err.Description
Resume Exit_Test
End Function
Dim appWd As Word.Application
Dim wdDoc As Word.Document
Set appWd = New Word.Application
appWd.Visible = True
Set wdDoc = appWd.Documents.Open("G:\Bulletin Board\UP Billing Flags\UP 1.2 - Health and Safety Plan.doc")
wdDoc.Bookmarks("WO").Select
wdDoc.ActiveWindow.Selection = Me.txtWorkOrderID
wdDoc.Save
wdDoc.Close
appWd.Quit
Set wdDoc = Nothing
Set appWd = Nothing