You are absolutly right. The code works fine on its own. I have tried on Win
XP & Vista it works on both. I think it's a local issue. Thanks for your help.
This code worked great for me this morning on my document, now it errors out
every time I click the command button. I have made no changes. any
suggestions on why it would work for days and then just errror out even when
no changes have been made>
> You are absolutly right. The code works fine on its own. I have tried on Win
> XP & Vista it works on both. I think it's a local issue. Thanks for your help.
[quoted text clipped - 19 lines]
> > document. If you have many of them, you can try first by copying everything
> > except the last ¶ and see how it goes.
Jeff - 30 Aug 2007 20:18 GMT
I have found that it doesnt like the other macros in my project. My thats
your problem too.
> This code worked great for me this morning on my document, now it errors out
> every time I click the command button. I have made no changes. any
[quoted text clipped - 24 lines]
> > > document. If you have many of them, you can try first by copying everything
> > > except the last ¶ and see how it goes.
Jeff - 30 Aug 2007 22:20 GMT
Try setting the HasRoutingSlip property to False. I think that is causing the
conflict.
> This code worked great for me this morning on my document, now it errors out
> every time I click the command button. I have made no changes. any
[quoted text clipped - 24 lines]
> > > document. If you have many of them, you can try first by copying everything
> > > except the last ¶ and see how it goes.
Jeff - 11 Sep 2007 13:50 GMT
I got it. See the code below:
Private Sub CommandButton2_Click()
ActiveDocument.HasRoutingSlip = True
With ActiveDocument.RoutingSlip
.Subject = "Doc Title"
.AddRecipient "EmailAddress@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.
> Try setting the HasRoutingSlip property to False. I think that is causing the
> conflict.
[quoted text clipped - 27 lines]
> > > > document. If you have many of them, you can try first by copying everything
> > > > except the last ¶ and see how it goes.