Open a MS Word doc within a MS Project Textbox

A

Ac-Deucy

I am trying to write VBA code in MS Project to allow users to open a specific
MS Word doc within a textbox in a form. The doc has a format setup for the
users to enter their text. When they are done, these comments would be saved
to the .mpp file.

How can I do this? In your reply, can you please provide code snippets
and/or links to WWW sites that can help?

THANKS!
 
M

mobe

I think you would not be able to do that in VBA. The forms in vba are pretty
simple and I do not believe you could open a word doc in a text box, let
alone a mail merge type one

I believe you'd need to write a managed addin (Other Project Types ->
Extenisbility -> Shared Add-in) in visual studio and write the form in that.
 
J

Jan De Messemaeker

Hi,

In the code of the form you have to open Word:

dim Wordapp as word.application
Set Wordapp=createobject ("Word.Application")

From then on, you can use all Word instructions within the form's code:
wordapp.documents.open ...

HTH
 
A

Ac-Deucy

I've used code similar to what you suggest to open the Word doc. But how do
I open it within the textbox that's in the MS Project form?

THANKS AGAIN!
 
J

Jan De Messemaeker

Hi,

In the form I suppose you install a button or anything to "make it happen"
In the _Click code for the button put the Word instructions.
If you will use the Word application object in other private subs as well
you will have to declare it public.
HTH
 

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