Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2005

Tip: Looking for answers? Try searching our database.

whats wrong with my code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dlb1228 - 03 Nov 2005 16:36 GMT
i have a command button in my word doc and i have the following code
Private Sub CommandButton1_Click()
Emailtest.HasRoutingSlip = True
With Emailtest.RoutingSlip
.Subject = "Test"
.AddRecipient "dbarbour@phfa.org"
.Delivery = wdAllAtOnce
End With
Emailtest.Route

my goal is that when i click on the command button i want it to email the
word doc to me   anyone know what is wrong    im new to vba code
Jean-Guy Marcil - 03 Nov 2005 17:17 GMT
dlb1228 was telling us:
dlb1228 nous racontait que :

> i have a command button in my word doc and i have the following code
> Private Sub CommandButton1_Click()
[quoted text clipped - 8 lines]
> my goal is that when i click on the command button i want it to email
> the word doc to me   anyone know what is wrong

No.
Maybe it has to do with "Emailtest". What is "Emailtest"?
You have to tell us what is going on... My crystal Ball is currently being
serviced  so I cannot guess correctly what undesired behaviour you are
getting when running your macro and what you expected instead.

Meanwhile, double check your code with the one posted at:
   http://word.mvps.org/FAQs/InterDev/SendMail.htm

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

dlb1228 - 03 Nov 2005 20:05 GMT
i really enjoyed your comments    is there any place that i can go to learn
how to write code?  i saw the link you provided but dont quite understand    
  its a real shame we have to put up with downgrading comments from people
like you    

> dlb1228 was telling us:
> dlb1228 nous racontait que :
[quoted text clipped - 20 lines]
> Meanwhile, double check your code with the one posted at:
>     http://word.mvps.org/FAQs/InterDev/SendMail.htm
Charles Kenyon - 03 Nov 2005 20:36 GMT
All responses here are from volunteers who do not work for Microsoft, your
fellow users. It was not downgrading but rather stating the obvious to note
that we don't know what the eMailtest procedure/method/function does, and
therefore don't have a clue as to whether or not it is working properly for
you.

For tutorials on writing code, I would suggest
http://word.mvps.org/FAQs/MacrosVBA.htm. You can find more at
http://addbalance.com/word/wordwebresources.htm#webvba.
Signature

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

>i really enjoyed your comments    is there any place that i can go to learn
> how to write code?  i saw the link you provided but dont quite understand
[quoted text clipped - 26 lines]
>> Meanwhile, double check your code with the one posted at:
>>     http://word.mvps.org/FAQs/InterDev/SendMail.htm
dlb1228 - 03 Nov 2005 21:36 GMT
then maybe he shouldnt have been a smart a**      i peronally would have said
i dont understand your question or something to that affect       there are
ways of handling situations instead of being a jerk

> All responses here are from volunteers who do not work for Microsoft, your
> fellow users. It was not downgrading but rather stating the obvious to note
[quoted text clipped - 35 lines]
> >> Meanwhile, double check your code with the one posted at:
> >>     http://word.mvps.org/FAQs/InterDev/SendMail.htm
Jean-Guy Marcil - 03 Nov 2005 22:18 GMT
dlb1228 was telling us:
dlb1228 nous racontait que :

> then maybe he shouldnt have been a smart a**      i peronally would
> have said i dont understand your question or something to that affect
> there are ways of handling situations instead of being a jerk

I will not comment on your method of handling this particular situation.

Sorry you took my comments so personally. I guess I forgot to add a smiley.
You posted some code and said that it did not work without saying why or
what you expected, then you asked if anyone understood what was wrong.

Read my response again, without getting all excited by my choice of words:

>>>> No.

You asked a question, I answered.

>>>> Maybe it has to do with "Emailtest". What is "Emailtest"?

I suggested a reason for my answer and at the same time an explanation for
the following comments:

>>>> You have to tell us what is going on... My crystal Ball is
>>>> currently being
>>>> serviced  so I cannot guess correctly what undesired behaviour you
>>>> are getting when running your macro and what you expected instead.

Just my way of making you understand that with the little details you
posted, it is very hard to help you, unless I wanted to guess, which might
end up being a big waste of time for you and me, and, as Charles pointed
out, I do not work for MSFT. I try to help because I enjoy it and find that
it is educational at many levels. This does not mean that I am willing to
waste time guessing answers to half formed questions. Believe me, you are
not the first person to whom I point out that they are not giving enough
details. The only difference in this case is that I send it too fast without
properly re-reading it... If I had, I would have added the proper symbol to
indicate I was joking, i.e :-)   ;-)  :-p etc.
Normally, in order to get help and to make sure nobody wastes time trying to
answer a question while not addressing the important issues, a poster has to
explain a problem, describe an actual  result and write about an expected
behaviour that is desired.

>>>> Meanwhile, double check your code with the one posted at:
>>>>     http://word.mvps.org/FAQs/InterDev/SendMail.htm

Nevertheless, I suggested a second source of information that might help.

So, all in all, it is not too bad; you posted a message that was lacking
information and I tried to give two avenues to explore interspersed with
what was meant as a facetious comment that you construed as a personal
attack. Sorry you felt that way.

Meanwhile, two people have mentioned that your Emailtest was not understood
and might have something to do with your problem, but, instead of addressing
that issue, you choose to try to flame me for trying to help you.

I will only answer back in this thread if you genuinely try to help us help
you instead of feeling persecuted or attacked because I was a little
sarcastic while trying to make a point.

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

Jean-Guy Marcil - 04 Nov 2005 19:52 GMT
dlb1228 was telling us:
dlb1228 nous racontait que :

> i really enjoyed your comments    is there any place that i can go to
> learn how to write code?  i saw the link you provided but dont quite
>   understand its a real shame we have to put up with downgrading
> comments from people like you

By the way, just stumbled upon this great quote:

"The English language, complete with irony, satire, and sarcasm, has
survived for centuries without smileys. Only the new crop of modern
computer geeks finds it impossible to detect a joke that is not clearly
labeled as such."
Ray Shea

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.