L
Louis
HELLO,
'( the trick with commandbar is given by Sue Mosher...)
Dim objItem As Object
Dim CB
dim cbb
Set objItem = oWord.ActiveDocument.MailEnvelope.Item
If objItem Is Nothing Then
MsgBox "Error returning the MailEnvelope object.", vbOKOnly + vbExclamation
GoTo Leave:
End If
Set CB = oWord.ActiveDocument.CommandBars
Set cbb = CB.FindControl(, 3738)
If Not cbb Is Nothing Then
cbb.Execute
Else
MsgBox "Error finding the MailEnvelope-Visible Commandbar.", vbOKOnly + vbExclamation
Endif
Set cbb = Nothing
Set CB = Nothing
' You have to keep the Mail Envelope in the window so the following
' is used only in the end...
'I tried this but it returns an error...
While oWord.ActiveDocument.Visible = True
DoEvents
Wend
Leave:
Set objItem = Nothing
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
'( the trick with commandbar is given by Sue Mosher...)
Dim objItem As Object
Dim CB
dim cbb
Set objItem = oWord.ActiveDocument.MailEnvelope.Item
If objItem Is Nothing Then
MsgBox "Error returning the MailEnvelope object.", vbOKOnly + vbExclamation
GoTo Leave:
End If
Set CB = oWord.ActiveDocument.CommandBars
Set cbb = CB.FindControl(, 3738)
If Not cbb Is Nothing Then
cbb.Execute
Else
MsgBox "Error finding the MailEnvelope-Visible Commandbar.", vbOKOnly + vbExclamation
Endif
Set cbb = Nothing
Set CB = Nothing
' You have to keep the Mail Envelope in the window so the following
' is used only in the end...
'I tried this but it returns an error...
While oWord.ActiveDocument.Visible = True
DoEvents
Wend
Leave:
Set objItem = Nothing
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com