?
Solved

Upload a document from MS Word ?

Posted on 2002-05-08
7
Medium Priority
?
183 Views
Last Modified: 2013-11-13
How can I carete a macro or add-in in VB, so it will
allow me to upload a doc from MS Word to a particular
web sever ?

I know I can do it in ASP, but I just want to try this in MS Word.
0
Comment
Question by:tanc02
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 1

Author Comment

by:tanc02
ID: 6996346
Any Code ?
0
 
LVL 3

Accepted Solution

by:
daffyduck14mil earned 800 total points
ID: 6996559
Hi,

In your template file, you can add a userform and load up an extra control, namely the "Microsoft Internet Transfer Control". You can then use all the properties and methods of this control to upload your file. This enables you to make a document that can save and send itself to, for example, an FTP site.

The code is real easy too, just use the execute method of the Inet control. For example, the following line sends the file C:\Temp\test.txt to the server kobaltnt_5 with the name test.txt in the root:

Inet1.Execute "ftp://kobaltnt_5", "put C:\temp\test.txt test.txt"

Off course you need some other code too, for error handling, and perhaps some additional things you might want to do. But basically this is it. Easy as the proverbial pie.

Grtz.©

D.
0
 
LVL 3

Expert Comment

by:Diveblue
ID: 6996889
Great if it works, but the Inet control is known for being buggy. I prefer to make the wininet calls directly (all code, no controls) let me know if you need the source code for the api calls.

scott
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:daffyduck14mil
ID: 6996906
:) Can you name me one product that MS made that isn't buggie? Almost everything contains bugs. It's the amount of damage or affect that must count. Just my view on this. :)

"If it doesn't fit, use a bigger hammer."

Grtz.©

D.
0
 
LVL 1

Author Comment

by:tanc02
ID: 6996924
Can I use winsock control ???
0
 
LVL 3

Expert Comment

by:Diveblue
ID: 6997521
The problem with using any control is that you need to distribute the control to each user & register it on the machine.
0
 
LVL 3

Expert Comment

by:Diveblue
ID: 6997522
The problem with using any control is that you need to distribute the control to each user & register it on the machine.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question