June 23rd, 2003, 09:41 AM
word .doc upload to web unsucessful..
I am trying to attach a word doc to a web upload and it is mostly unsucessful (annoyingly).
I am working with someone elses code, and the main problem in finding the error is that I'm not that familiar with uploading to the web.
If anyone has any suggestions from looking at the code, or any ideas of where to read up about uploads (need to be able to send text docs, word docs and jpgs etc), then that would be great too!
Set wrdAD = New Word.Application
wrdAD.Visible = True
wrdAD.WindowState = wdWindowStateMaximize
wrdAD.Documents.Open EASY_WORD_TEMPLATES_LOCATION & "\AdvertListing.doc", ReadOnly:=True
If Not frmAdverts.ListView1.ListItems.Count = 0 Then
Call MergeAdvert(rstSalesParticulars, rstProperty, adStyleAdvert, wrdAD)
If Dir("C:\Temp", vbDirectory) = "" Then
wrdAD.ActiveDocument.SaveAs filename:="web2.doc", FileFormat:=wdFormatDocument, _
LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _
:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
Set wrdAD = Nothing
For i = 0 To 500
June 24th, 2003, 04:31 PM
Are you uploading from a remote site? Is the client on a web browser?
June 25th, 2003, 05:40 AM
when you say am i posting from a remote site, do you mean am I sending the file from somewhere other than the website? in which case yes.
what do you mean by is the client on a web browser? I am sending test files through to our ftp website just to see what arrives and if its complete...
another question for you, why would the word documents that i'm sending come up with a download box, but never finish downloading - mainly. but just once I have seen a whole complete .doc, this confuses me as it generally doesnt work but has been seen once..!
June 25th, 2003, 07:39 AM
My line of question was to determine the nature of the application. I am assuming your are using an IIS server and VBScript. I would look at this step by step. Step one: is the directory getting created? If not, correct. Step 2: Is the file being uploaded? If not, correct.
Are these two things happening?
June 26th, 2003, 03:47 AM
the file is being created as it is sent to c:\temp and then sent from there. when i go into temp the .doc has been created fine.
the problem is it is very inconsistent about being uploaded. I have only seen the entire file once, the rest of the time it appears to have arrived on the web site, but i cant access it. or it says its downloading it, but the downloading never ends...
the step by step bit is logical, its how to correct the code when cant find anything to compare it against. I didnt write the code to start with, and need a comparison to help me examine it with any focus.