OVH Cloud OVH Cloud

UNC path setting

1 réponse
Avatar
berhe
I have NT workstation sp6a with msword 97 SR-2.
I use the following macro: compilation is ok but
during execution it does not change the path to the
UNC name given. It raises error. Can some one lend me a
hand ?

Declare Function ChDirUNC Lib "kernel32"
Alias "SetCurrentDirectoryA" _
(ByVal lpPathName As String) As Long

Sub MAIN

S = ChDirUNC("\\servername\shared")
f S = 0 Then Err.Raise 9999, , "Error setting path."

End Sub

Thanks
Berhe

1 réponse

Avatar
Dédé
Hi


Heinnn quoiiii ??

FR=French=Französich=Français ...

Salutations et essayez les groupes anglophones ;-))

Salutations
Dédé

--
Pour me répondre, copiez cette formule dans excel ;-) et sur une seule ligne
!
ÊR(83)&CAR(117)&CAR(103)&CAR(117)&CAR(115)&CAR(49)&CAR(50)&CAR(48)&CAR(48)
&CAR(50)&CAR(64)&CAR(121)&CAR(97)&CAR(104)&CAR(111)&CAR(111)&CAR(46)&CAR(102
)&CAR(114)

Sites de références,
Word :
http://faq.ms.word.free.fr/
Barre de menu disparues ? voir ici -
http://faq.ms.word.free.fr/Environnement/Environnement_reponses.htm#e1
Incrémentation chronologique ?
http://faq.ms.word.free.fr/VBA/VBA_reponses.htm#v3
Chiffres en lettres ? (Word et Excel)
http://faq.ms.word.free.fr/VBA/VBA_reponses.htm#v4
Excel :
http://www.excelabo.net/
http://jacxl.free.fr/cours_xl/cours_xl_jac.html#accueil_xl
http://dj.joss.free.fr/faq.htm
http://perso.wanadoo.fr/frederic.sigonneau/
http://excel.1.free.fr/

"berhe" a écrit dans le message de
news:0a8401c3a396$76a43240$
I have NT workstation sp6a with msword 97 SR-2.
I use the following macro: compilation is ok but
during execution it does not change the path to the
UNC name given. It raises error. Can some one lend me a
hand ?

Declare Function ChDirUNC Lib "kernel32"
Alias "SetCurrentDirectoryA" _
(ByVal lpPathName As String) As Long

Sub MAIN

S = ChDirUNC("servernameshared")
f S = 0 Then Err.Raise 9999, , "Error setting path."

End Sub

Thanks
Berhe