Solved

Upload a document from MS Word ?

Posted on 2002-05-08
7
181 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
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!

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

737 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