 |
| VB How-To Ask your "How do I do this with VB?" questions in this forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

October 28th, 2003, 12:41 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
Word VBA Syntax Needed
Can someone show me the syntax in a Microsoft Word XP VBA procedure that would read data from a linked (ODBC) Microsoft Access MDB file and compose a Novell GroupWise 6.0 e-mail message?
In a nutshell: In Microsoft Word XP, I click a toolbar button that activates a macro. The macro runs a procedure in VBA that reads Access XP data and stores it in variables. GroupWise then fires up and a GroupWise note is sitting there all addressed and filled out waiting for me to click SEND.
Getting the data is no problem. I use the SQLRetrieveItem$(connect_num, X, 1) function. Composing the body of the letter and addressing it is no problem. What I'm looking for is the proper syntax to activate Novell GroupWise and assign the TO, SUBJECT, MESSAGE, etc. from my variables to it. I don't want it to actually send the e-mail because I want to be able to add personal comments to the message before clicking SEND.
Thanks.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
__________________
Greg Serrano
Michigan Dept. of Environmental Quality
Air Quality Division
|
|

October 28th, 2003, 12:54 PM
|
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Groupwise is MAPI compliant so
docmd.SendObject ObjectType,objectname,Outputformat (.doc),To,CC,Bcc,Subject,MessageText,EditMEssage(T rue/False
will work
Does this help?
Sal
|
|

October 28th, 2003, 01:15 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
Which reference library must be open for DoCmd to work? Right now, when I type DoCmd., typing the period should activate the automatic phrase completion but it doesn't. And if I type docmd.sendobject with the rest and go to the next line, nothing capitalizes, signaling to me that the syntax is not being recognized.
I know DoCmd is an Access VBA thing, but is it a Word VBA thing?
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|
|

October 28th, 2003, 01:49 PM
|
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You may not need the docmd at all to run the code. I guess the docmd is an Access thing. I have used it by referencing the Access library, but if you user does not have access, it would not run.
Sal
|
|

October 28th, 2003, 02:16 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
Sal, the combination of the DoCmd.SetObject after activating the Access reference libary worked. Thanks.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|
|
 |