Private Sub CommandButton2_Click()
ActiveDocument.HasRoutingSlip = True
With ActiveDocument.RoutingSlip
.Subject = "Doc Title"
.AddRecipient "EmailA...@Email.com"
.Delivery = wdAllAtOnce
End With
ActiveDocument.Route
End Sub
What am i doing wrong? I know this should work. HELP!!!
Where is the command button?
On the page, in a userform, elsewhere?
What is the document content?
What Word version?
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarci...@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
> The Command button is on the page. The document is a survey like form
> i would like to have emailed to a specific person. I am using Word
> 2002.
I just tested your code as is on a protected document (for forms) and it did
work as excepted.
I do not have access to my 2002 machine right now though...
Can you try your document on Word 2003 and see if it crashes as well?
If it does, there is probably something corrupted in your template. You will
need to rebuild it from a fresh document.
You can try copying all of it except the last ś and any section breaks. It
is safer to recreate the section breaks when trying to recreate a corrupted
document. If you have many of them, you can try first by copying everything
except the last ś and see how it goes.
"Jean-Guy Marcil" wrote:
> Jeff was telling us:
> Jeff nous racontait que :
>
> > The Command button is on the page. The document is a survey like form
> > i would like to have emailed to a specific person. I am using Word
> > 2002.
>
> I just tested your code as is on a protected document (for forms) and it did
> work as excepted.
>
> I do not have access to my 2002 machine right now though...
>
> Can you try your document on Word 2003 and see if it crashes as well?
>
> If it does, there is probably something corrupted in your template. You will
> need to rebuild it from a fresh document.
> You can try copying all of it except the last ¶ and any section breaks. It
> is safer to recreate the section breaks when trying to recreate a corrupted
> document. If you have many of them, you can try first by copying everything
> except the last ¶ and see how it goes.
Private Sub CommandButton2_Click()
ActiveDocument.HasRoutingSlip = True
With ActiveDocument.RoutingSlip
.Subject = "Doc Title"
.AddRecipient "EmailA...@Email.com"
.Delivery = wdAllAtOnce
End With
ActiveDocument.Route
ActiveDocument.HasRoutingSlip = False
End Sub
You have to tell VBA to reset the Routing slip property to false to get
this to work everytime.