Précédent   Forum des professionnels en informatique > Logiciels > Microsoft Office > Général VBA
Général VBA Forum général VBA . Pour les logiciels spécifiques (Access, Excel, Word, ...), postez dans les bons sous forums.
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 29/11/2006, 11h40   #1
Invité de passage
 
Inscription : novembre 2006
Messages : 2
Détails du profil
Informations forums :
Inscription : novembre 2006
Messages : 2
Points : 0
Points : 0
Par défaut probleme avec wdbordervertical

Bjr à tous.

la commande suivante:
Code :
matable.range.border(wdborderhorizontal).xxx=maconstante
fonctionne très bien.

Par contre:
Code :
matable.range.border(wdbordervertical).xxx=maconstante
Non. Il me retourne une erreur 5941.

Problème interne VBA?
Je sèche!!!!


Quelqu'un a-til déjà rencontré ce problème et trouvé la solution ad hoc?
MCI.
chausson29 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 29/11/2006, 12h32   #2
Inactif
 
Avatar de ouskel'n'or
 
Inscription : février 2005
Messages : 12 466
Détails du profil
Informations forums :
Inscription : février 2005
Messages : 12 466
Points : 11 930
Points : 11 930
Et si tu mets
Code :
1
2
3
4
With MaTable
     .range.border(wdborderhorizontal).xxx=maconstante 
     .range.border(wdbordervertical).xxx=maconstante 
end with
A tout hasard (pas testé)
ouskel'n'or est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 29/11/2006, 12h54   #3
Responsable Visual Basic
 
Avatar de bbil
 
Inscription : juin 2003
Messages : 11 773
Détails du profil
Informations personnelles :
Âge : 45
Localisation : France, Ariège (Midi Pyrénées)

Informations forums :
Inscription : juin 2003
Messages : 11 773
Points : 16 854
Points : 16 854
Envoyer un message via Skype™ à bbil
essai de metter "manuellement" sous word cette bordure horizontale voir si tous ce passe bien....
bbil est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 29/11/2006, 13h21   #4
Invité de passage
 
Inscription : novembre 2006
Messages : 2
Détails du profil
Informations forums :
Inscription : novembre 2006
Messages : 2
Points : 0
Points : 0
J'ai effectivement essayé avec un with.
Et à la main, cela fonctionne très bien.
Quelqu'un pourrait-il essayer chez lui, voir si c'est mon install d'Excel, ou un bug.
Tapez le code suivant:

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 Dim WordApp As Word.Application
Dim WordDoc As Word.Document
Dim maTab As Table
 
Set WordApp = CreateObject("word.application")    'ouvre une session Word
    Set WordDoc = WordApp.Documents.Open("monfichier.doc")    'ouvre le document Word
    WordApp.Visible = True 
 
Set maTab = WordDoc.Tables.Add(WordDoc.Bookmarks("monsignet").Range, 3, 3)
 
With maTabx.Range
    .ParagraphFormat.Alignment = wdAlignParagraphCenter
    .Borders(wdBorderLeft).LineStyle = wdLineStyleNone
    .Borders(wdBorderRight).LineStyle = wdLineStyleNone
    .Borders(wdBorderTop).LineStyle = wdLineStyleNone
    .Borders(wdBorderBottom).LineStyle = wdLineStyleNone
    .Borders(wdBorderHorizontal).LineStyle = wdLineStyleNone
    .Borders(wdBorderVertical).Color = wdColorWhite
    .Borders.Shadow = False
End With
chausson29 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 29/11/2006, 19h18   #5
Membre Expert
 
Inscription : juillet 2006
Messages : 1 677
Détails du profil
Informations personnelles :
Localisation : France, Hérault (Languedoc Roussillon)

Informations forums :
Inscription : juillet 2006
Messages : 1 677
Points : 1 812
Points : 1 812
Citation:
Quelqu'un pourrait-il essayer chez lui
Testé sous w2k - Office 2k, c'est pareil : erreur 5941...
HTH,
--
jp
Jipété est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/11/2006, 09h57   #6
Responsable Visual Basic
 
Avatar de bbil
 
Inscription : juin 2003
Messages : 11 773
Détails du profil
Informations personnelles :
Âge : 45
Localisation : France, Ariège (Midi Pyrénées)

Informations forums :
Inscription : juin 2003
Messages : 11 773
Points : 16 854
Points : 16 854
Envoyer un message via Skype™ à bbil
et en enlevant le .range ...?
Code :
1
2
3
4
5
6
7
8
 
 
maTab.Range.ParagraphFormat.Alignment = wdAlignParagraphCenter
With maTab
    ....
   .Borders(wdBorderVertical).Color = wdColorWhite
    .Borders.Shadow = False
End With
bbil est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 13h25.


 
 
 
 
Partenaires

Hébergement Web