Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Axel Guerrier [MS]
Bonjour Mario,
tu peux essayer ce code
(add a command button and a FileListBox control to a form)
Private Type SHELLEXECUTEINFO
cbSize As Long
fMask As Long
hwnd As Long
lpVerb As String
lpFile As String
lpParameters As String
lpDirectory As String
nShow As Long
hInstApp As Long
' Optional fields
lpIDList As Long
lpClass As String
hkeyClass As Long
dwHotKey As Long
hIcon As Long
hProcess As Long
End Type
Private Const SEE_MASK_INVOKEIDLIST = &HC
Private Declare Function ShellExecuteEx Lib "shell32.dll" (s As SHELLEXECUTEINFO)
As Long
Private Sub Command1_Click()
Dim se As SHELLEXECUTEINFO
se.cbSize = Len(se)
se.lpFile = File1.Path & "" & File1.filename
se.lpVerb = "properties"
se.fMask = SEE_MASK_INVOKEIDLIST
ShellExecuteEx se
End Sub
Private Sub Form_Load()
'Modify as needed to view the desired files; this is just a simple example:
File1.Path = "c:"
File1.Pattern = "*.doc"
End Sub
-- Axel Guerrier Microsoft France -------------------- Merci de bien vouloir répondre à ce message dans le newsgroup où il a été posté. Je le consulte régulièrement.
"Mario" wrote in message news:057401c4eb98$cd7af400$ Bonjour,
Je voudrais pouvoir modifier les propriétés d'un document Word : Exemple la propriété titre.
Y aurait-il un exemple de code duquel je pourrais m'inspirer ?
D'avance merci Mario
Bonjour Mario,
tu peux essayer ce code
(add a command button and a FileListBox control to a form)
Private Type SHELLEXECUTEINFO
cbSize As Long
fMask As Long
hwnd As Long
lpVerb As String
lpFile As String
lpParameters As String
lpDirectory As String
nShow As Long
hInstApp As Long
' Optional fields
lpIDList As Long
lpClass As String
hkeyClass As Long
dwHotKey As Long
hIcon As Long
hProcess As Long
End Type
Private Const SEE_MASK_INVOKEIDLIST = &HC
Private Declare Function ShellExecuteEx Lib "shell32.dll" (s As
SHELLEXECUTEINFO)
As Long
Private Sub Command1_Click()
Dim se As SHELLEXECUTEINFO
se.cbSize = Len(se)
se.lpFile = File1.Path & "" & File1.filename
se.lpVerb = "properties"
se.fMask = SEE_MASK_INVOKEIDLIST
ShellExecuteEx se
End Sub
Private Sub Form_Load()
'Modify as needed to view the desired files; this is just a simple example:
File1.Path = "c:"
File1.Pattern = "*.doc"
End Sub
--
Axel Guerrier
Microsoft France
--------------------
Merci de bien vouloir répondre à ce message dans le newsgroup où il a été
posté. Je le consulte régulièrement.
"Mario" <anonymous@discussions.microsoft.com> wrote in message
news:057401c4eb98$cd7af400$a501280a@phx.gbl...
Bonjour,
Je voudrais pouvoir modifier les propriétés d'un document
Word : Exemple la propriété titre.
Y aurait-il un exemple de code duquel je pourrais
m'inspirer ?
(add a command button and a FileListBox control to a form)
Private Type SHELLEXECUTEINFO
cbSize As Long
fMask As Long
hwnd As Long
lpVerb As String
lpFile As String
lpParameters As String
lpDirectory As String
nShow As Long
hInstApp As Long
' Optional fields
lpIDList As Long
lpClass As String
hkeyClass As Long
dwHotKey As Long
hIcon As Long
hProcess As Long
End Type
Private Const SEE_MASK_INVOKEIDLIST = &HC
Private Declare Function ShellExecuteEx Lib "shell32.dll" (s As SHELLEXECUTEINFO)
As Long
Private Sub Command1_Click()
Dim se As SHELLEXECUTEINFO
se.cbSize = Len(se)
se.lpFile = File1.Path & "" & File1.filename
se.lpVerb = "properties"
se.fMask = SEE_MASK_INVOKEIDLIST
ShellExecuteEx se
End Sub
Private Sub Form_Load()
'Modify as needed to view the desired files; this is just a simple example:
File1.Path = "c:"
File1.Pattern = "*.doc"
End Sub
-- Axel Guerrier Microsoft France -------------------- Merci de bien vouloir répondre à ce message dans le newsgroup où il a été posté. Je le consulte régulièrement.
"Mario" wrote in message news:057401c4eb98$cd7af400$ Bonjour,
Je voudrais pouvoir modifier les propriétés d'un document Word : Exemple la propriété titre.
Y aurait-il un exemple de code duquel je pourrais m'inspirer ?
D'avance merci Mario
ng
Salut,
Il faudra utiliser l'automation word. Regarde si tu peux faire ca avec le modèle d'objet Word.
-- Nicolas G. FAQ VB : http://faq.vb.free.fr API Guide : http://www.allapi.net Google Groups : http://groups.google.fr/ MZ-Tools : http://www.mztools.com/
Mario wrote:
Bonjour,
Je voudrais pouvoir modifier les propriétés d'un document Word : Exemple la propriété titre.
Y aurait-il un exemple de code duquel je pourrais m'inspirer ?
D'avance merci Mario
Salut,
Il faudra utiliser l'automation word. Regarde si tu peux faire ca avec le
modèle d'objet Word.
--
Nicolas G.
FAQ VB : http://faq.vb.free.fr
API Guide : http://www.allapi.net
Google Groups : http://groups.google.fr/
MZ-Tools : http://www.mztools.com/
Mario wrote:
Bonjour,
Je voudrais pouvoir modifier les propriétés d'un document
Word : Exemple la propriété titre.
Y aurait-il un exemple de code duquel je pourrais
m'inspirer ?
Il faudra utiliser l'automation word. Regarde si tu peux faire ca avec le modèle d'objet Word.
-- Nicolas G. FAQ VB : http://faq.vb.free.fr API Guide : http://www.allapi.net Google Groups : http://groups.google.fr/ MZ-Tools : http://www.mztools.com/
Mario wrote:
Bonjour,
Je voudrais pouvoir modifier les propriétés d'un document Word : Exemple la propriété titre.
Y aurait-il un exemple de code duquel je pourrais m'inspirer ?