Outlook 2003 - Set Virables via command line

L

Louis Berniquez

I'm trying to create a VBA script that will be executed via the command line (I'm integrating into another application, it's my only option)

What I would like to do is create a VBA script that will have it's variables set via the command line, but cannot find the code. Is it possible?

more or less something along the lines of :

"C:\Program Files\Microsoft Office\Office\Outlook.exe" /c ipm.note /altvba otmfilename -v1=string or ?v1=string

Is something like this possible by defining it in the subroutines?

eg. Sub CreateOutlookTask(v1 as String)

The main idea is to pull variables from my other application in the command line, define the settings and have the VBA auto-populate the information to/from and use an HTML template inserted as the body.

Any ideas, is it even possible?

Of course, could enter manually, but am trying to limit user interface to a minimum.

Help



Submitted via EggHeadCafe - Software Developer Portal of Choice
Dr. Dotnetsky's Cool .Net Tips and Tricks No. 26
http://www.eggheadcafe.com/tutorial...be30-cde5d852348d/dr-dotnetskys-cool-net.aspx
 
M

Michael Bauer [MVP - Outlook]

I don't think it possible with a command line. You could have a public
method in the Application object, and call that from outside:

private m_v$
Public Sub Whatever(v$)
m_v=v
End Sub

And call it this way:

Dim obj as Object
Set obj=CreateObject("Outlook.Application")
obj.Whatever "hallo"

--
Best regards
Michael Bauer - MVP Outlook
Manage and share your categories:
<http://www.vboffice.net/product.html?pub=6&lang=en>


Am Sat, 27 Feb 2010 06:02:30 -0800 schrieb Louis Berniquez:
I'm trying to create a VBA script that will be executed via the command
line (I'm integrating into another application, it's my only option)
What I would like to do is create a VBA script that will have it's
variables set via the command line, but cannot find the code. Is it
possible?
more or less something along the lines of :

"C:\Program Files\Microsoft Office\Office\Outlook.exe" /c ipm.note /altvba
otmfilename -v1=string or ?v1=string
Is something like this possible by defining it in the subroutines?

eg. Sub CreateOutlookTask(v1 as String)

The main idea is to pull variables from my other application in the
command line, define the settings and have the VBA auto-populate the
information to/from and use an HTML template inserted as the body.
Any ideas, is it even possible?

Of course, could enter manually, but am trying to limit user interface to a minimum.

Help



Submitted via EggHeadCafe - Software Developer Portal of Choice
Dr. Dotnetsky's Cool .Net Tips and Tricks No. 26
http://www.eggheadcafe.com/tutorial...be30-cde5d852348d/dr-dotnetskys-cool-net.aspx
 

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