Solved

Upload a document from MS Word ?

Posted on 2002-05-08
7
174 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
  • 3
  • 2
  • 2
7 Comments
 
LVL 1

Author Comment

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

Accepted Solution

by:
daffyduck14mil earned 200 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
My project did see openJDK that I installed. What could be the problem 7 122
mapBully challenge 6 113
Problem to event 3 75
Run code from text file in vb 1 56
There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
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…
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 …
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

914 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now