Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Problem writing to DocumentHTML inside FrontPage Add-in

Posted on 2002-06-10
4
Medium Priority
?
223 Views
Last Modified: 2008-02-01
I'm stuck trying to manually create a non-HTML file in a FrontPage 2000 web from within an addin. When the addin is activated, the following code runs (non-relevant code removed)

  Dim Root As WebFolder
  Dim AllFiles As WebFiles
  Dim ThisFile As WebFile
  Dim ThisPage As PageWindow
  Dim ThisDoc As FPHTMLDocument

  Set Root = Application.ActiveWeb.RootFolder
  Set AllFiles = Root.Files
  Set ThisFile = AllFiles.Add("/Whateverfile.xyz", False)
  Set ThisPage = ThisFile.Edit(fpPageViewHtml)
  Set ThisDoc = ThisPage.Document
  ThisDoc.DocumentHTML = "Whatever goes here xyz"     ' ***** Fails
  ThisPage.Close True

Looks fine to me, and works fine - except for the line commented "Fails" above. When I attempt to assign an arbitrary string to the DocumentHTML property, it bombs with "Run time error 70 - Permission Denied". No matter what I do, any attempt to alter the DocumentHTML propery fails with that error. Reading the value of the property is fine - it shows the contents of a FP-created blank HTML page.

Any idea why this is so? DocumentHTML is supposed to be a read/write property, correct? Is there a better way I could go about this?
0
Comment
Question by:ScottNero
4 Comments
 
LVL 1

Expert Comment

by:vblogic
ID: 7068163
I'm not an FP person, but generally speaking you cannot alter the contents of a loaded html file until it is fully loaded.  Are the methods of loading the file synchronous so we know that this is not an issue, or is it asynchronous and perhaps there is some event that you can watch for that tells you if the document has been fully loaded?
0
 
LVL 1

Author Comment

by:ScottNero
ID: 7068174
I don't think that's the problem. I can step through it in the VB debugger, watch it load the file, see the file in the editor, then manually (in the debug window) try to edit the DocumentHTML property, and it still comes up with the same Permission Denied error. I've searched around the web and found a few people who have encountered the same problem, but never an answer - just the problem description.
0
 
LVL 16

Expert Comment

by:twalgrave
ID: 7897276
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
- PAQ'd and points refunded
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

twalgrave
Cleanup Volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 7941802
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

782 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