Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 28th, 2003, 12:41 PM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default 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
Reply With Quote
  #2 (permalink)  
Old October 28th, 2003, 12:54 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Location: Clarksville, TN, USA.
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #3 (permalink)  
Old October 28th, 2003, 01:15 PM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

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
Reply With Quote
  #4 (permalink)  
Old October 28th, 2003, 01:49 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Location: Clarksville, TN, USA.
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #5 (permalink)  
Old October 28th, 2003, 02:16 PM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vba Consolidate Syntax grouth Excel VBA 3 September 29th, 2006 07:37 PM
Syntax Needed SerranoG Access VBA 4 February 6th, 2004 06:41 PM
help with VBA syntax jacqui Excel VBA 0 January 12th, 2004 02:08 PM
Procedure Calling Syntax Needed SerranoG Access VBA 4 October 24th, 2003 07:03 AM
SQL syntax for my query - guru needed badgolfer Access 2 September 20th, 2003 01:52 PM



All times are GMT -4. The time now is 11:59 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.