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 / July 2005

Tip: Looking for answers? Try searching our database.

RUNNING A MACRO

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
- 08 Jul 2005 13:24 GMT
I need to run a VBA Macro without opening a Microsoft Office file.

Can you help me?

Many thanks.

Guido
Helmut Weber - 08 Jul 2005 13:28 GMT
Hi Guido,

no way, unless you buy microsoft before. ;-)

Greetings from Bavaria, Germany

Helmut Weber, MVP, WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Jezebel - 09 Jul 2005 00:25 GMT
It's like saying you want to listen to the music without taking the CD out
of the case.

>I need to run a VBA Macro without opening a Microsoft Office file.
>
[quoted text clipped - 3 lines]
>
> Guido
- 09 Jul 2005 01:38 GMT
You didn't understand. I HAVE microsoft office professional version, simply
i need to run my *.bas without opening excel or word (for exemple) because i
need that program but i don't need to use office (the macro will open word,
only with particular conditions)...
Peraphs i must use VB?
Jezebel - 09 Jul 2005 03:03 GMT
I understand full well what you're trying to do; I'm just surprised that you
could have reached this point without a better understanding of the tools
you're working with.

VBA is an integral part of an application (that's exactly what the A in VBA
is all about): so you can't, by definition, use VBA without opening the
application it belongs to. If you want your code to run stand-alone, you
need VB.

> You didn't understand. I HAVE microsoft office professional version,
> simply i need to run my *.bas without opening excel or word (for exemple)
> because i need that program but i don't need to use office (the macro will
> open word, only with particular conditions)...
> Peraphs i must use VB?
Jay Freedman - 09 Jul 2005 04:19 GMT
Guido,

You could use VB or VBscript to launch Word or Excel and start the
macro by automation.

But be clear on this point: the *macro* (the VBA code in the .bas
file) will not begin to run until after the Office app starts. Until
then, you must be running some other kind of code.

If you use VB, be aware that there are differences between VBA syntax
and VB syntax, even though they both use the .bas extension when you
save the code. You'll probably have to modify the code to get it to
run in VB.

--
Regards,
Jay Freedman
Microsoft Word MVP         FAQ: http://word.mvps.org

>I understand full well what you're trying to do; I'm just surprised that you
>could have reached this point without a better understanding of the tools
[quoted text clipped - 10 lines]
>> open word, only with particular conditions)...
>> Peraphs i must use VB?
- 09 Jul 2005 10:25 GMT
Thank you very much. I'll begin to write VB code!
Peraphs you think that I ask a stupid thing, but you must know that in Italy
there aren't so many people knowing Office so well, so I never found anyone
who told what to do!!!

See you at the next question!!! ;-)

Guido
Jay Freedman - 09 Jul 2005 19:57 GMT
Hi Guido,

We often say that there is no such thing as a stupid question. If you
don't know something, ask -- that's why we're here.

If you haven't already found it, you may be interested in visiting
microsoft.public.it.office.word, which is an Italian-language
newsgroup for questions about Word.

--
Regards,
Jay Freedman
Microsoft Word MVP         FAQ: http://word.mvps.org

>Thank you very much. I'll begin to write VB code!
>Peraphs you think that I ask a stupid thing, but you must know that in Italy
[quoted text clipped - 4 lines]
>
>Guido
- 10 Jul 2005 02:23 GMT
WOW! I didn't konw! I subscrive now!!!
Many thanks!

Guido

> Hi Guido,
>
[quoted text clipped - 20 lines]
>>
>>Guido
 
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.