Routing Macro

J

jon.mullich

I am trying to create a macro that will route the file as an e-mail. The
first few times I tried it, it worked great, but then it began crashing the
program. I don't know what I did wrong, can you help? The macro is:


Sub Routing()
'
' Routing Macro
' Macro created 04/13/2006 by MullichJon
'
ActiveDocument.HasRoutingSlip = True
With ActiveDocument.RoutingSlip
.Subject = "ORDER SHIPMENT"
.AddRecipient " e-mail@adress"
.Delivery = wdAllAtOnce
End With
ActiveDocument.Route

End Sub
 
S

Shauna Kelly

Hi Jon

We may need more clues.

First, what version of Word do you have, what email client and, if that's
Outlook, what version of Outlook?

Second, what symptoms does Word display when it crashes? Do you get an error
message? If you use F8 to step through the code, where does the error occur?

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 
J

jon.mullich

Hi, Shauna. I suspected I didn't give enough information!

First, what version of Word do you have, what email client and, if that's
Outlook, what version of Outlook?

Office 2003
Outlook 2003
Second, what symptoms does Word display when it crashes? Do you get an error
message? If you use F8 to step through the code, where does the error occur?

The error is simply "Microsoft Word has encountered a problem and needs to
close." The error report reads:
AppName: winword.exe AppVer: 11.0.6502.0 AppStamp:424d964d
ModName: winword.exe ModVer: 11.0.6502.0 ModStamp:424d964d
fDebug: 0 Offset: 006b1f94

Does that help at all?
 
S

Shauna Kelly

Hi Jon

I don't have much experience of routing documents using VBA for Routing, but
failing better advice from someone else, this is what I'd try:

1. Does it crash on every machine, or just some?

2. Does it crash if you already have Outlook open, or only if Outlook is
closed?

3. Does it depend on whether Word is set as the email editor in Outlook?

4. Are there any other add-ins running (the following article explains how
to find them all:
http://office.microsoft.com/en-au/assistance/HA011514521033.aspx)

5. Did you recently install any new patches (for what it's worth, I've got
all the latest patches and your code works OK for me).

6. Do you have any hidden instances of Word or Outlook running (use Task
Manager to look for winword.exe and outlook.exe).

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top