Solved

Upload a document from MS Word ?

Posted on 2002-05-08
7
182 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 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

705 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