WordComAdfdin: create an instace for each document

S

Shinya

I am trying to create one instance(winword.exe)
for each document.

Where to new word.application object?
IDTExtensibility2_OnConnection
wordobj_NewDocument
wordobj_DocumentOpen

nothing works for me.

Shinya
 
S

S.Vidyaraman

I am trying to create one instance(winword.exe)
for each document.

You cannot do that. There is just one instance of winword.exe for all
documents. In the OnConnection function, get your application object and
cast it to word.application. Dont create a new word.application object.
Where to new word.application object?
IDTExtensibility2_OnConnection
wordobj_NewDocument
wordobj_DocumentOpen

nothing works for me.

Could you please be more clear what exactly you want to do ?

S.Vidyaraman
 
S

Shinya

I want to create a ftp client like addin for office application
when you finish working on the document you just click addin
button to login and upload to ftp server. when i have multiple
documents open i want to be able to access different ftp server
for each document.

However, since the word application allow one instance to run
I only have one connection for all documents open.

any idea?

Shinya
 
S

S.Vidyaraman

I want to create a ftp client like addin for office application
when you finish working on the document you just click addin
button to login and upload to ftp server. when i have multiple
documents open i want to be able to access different ftp server
for each document.

However, since the word application allow one instance to run
I only have one connection for all documents open.

Word running only one instance of WinWord to run need not restrict you from
establishing multiple connections. In fact it doesn't have anything to do
with FTP / connections etc.

1. Create a button : "FTP Document"
2. In the action handler, check if there is a document open (presumably the
user is trying to send the currently open document)
3. If so, present a dialog box for entering details about the FTP server.
4. Connect to the FTP Server and upload the document.

This way you don't need to maintain an active connection to the FTP
Server(s) throughout the lifetime of the document.
Hope this helps.
S.Vidyaraman
 
S

Shinya

Thanks,

Probably that's is only solution, if instantiating multiple
word.application object is not optinal.

I guess I will recode everything in array usr password and
at windows activate connect to corresponding
ftp server.

Thanks, again for your help.

Shinya
 
C

Cindy M -WordMVP-

Hi Shinya,
I am trying to create one instance(winword.exe)
for each document.

Where to new word.application object?
IDTExtensibility2_OnConnection
wordobj_NewDocument
wordobj_DocumentOpen
In all the programming languages I use, it would be
Dim wordapp as New Word.Application. IOW, using the NEW
keyword.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 

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