FrontPage - Refresh Active Document

J

Jason

Building a FrontPage Add-in with VB.Net 2003. The addin manipulates HTML code
in the activedocument.

When an HTML page is opened that contains a reference to a Style Sheet
Sometime the style sheet gets loaded too but sometimes it does not. I would
like to be able to force FrontPage to "Refresh" or Reload the style sheet
from within my Code. As an example. If I open the Page, change one character
on the page and then hit save. The page is saved and then the statusbar
displays a message that it is retrieving the Style Sheet..The page then
displays correctly..

Is there a way for me to force this? If not, can I "Load" the Style sheet
for the Active document?

Thanks
Jason
 
W

Wei-Dong XU [MSFT]

Hi ,

As I know, in Frontpage object model, the Refresh method is not provided
from programmatic access. Please read this page:
Refresh Method (Page Object Model)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbafpd11/ht
ml/fdmthRefresh.asp

When you switch to the code view in Frontpage, you can use the
parseCodeChanges Method to update the page.
parseCodeChanges Method
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbafpd11/ht
ml/fdmthparseCodeChanges.asp

Please feel free to let me know if you have any question.

Best Regards,
Wei-Dong XU (WD)
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jason

Not sure that this gives me anything.

Are there no functions available to force the load of the stylesheet
referenced in the page being edited? On Save the Stylesheet is Retrieved. Why
does it not retrieve on initial opening?? can I force it to retrieve?

Thanks
Jason
 
W

Wei-Dong XU [MSFT]

Hi Jason,

The event provided by Frontpage from SDK is all regarding the HTML event,
OnClick etc. There is no event from SDK for forcing the loading of CSS.

So far as I know, if you are going to control the rendering of the page,
I'd suggest you can host the IEweb browser ActiveX control to implement one
html page editor. There is one MFC sample for this:
HTMLEdit Sample: Wraps the Internet Explorer MSHTML Editing Control
http://msdn.microsoft.com/library/en-us/vcsample/html/vcsamHTMLEdSampleWraps
InternetExplorerMSHTMLEditingControl.asp

Please feel free to let me know if you have any question.

Best Regards,
Wei-Dong XU (WD)
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jason

Thanks for the suggestion...I'm building a FrontPage Add-in so that solution
would not work for me...Not to worry I'll figure something out..

Thanks
Jason
 
W

Wei-Dong XU [MSFT]

Hi Jason,

You are very welcome! Don't hesitat to let me know if you have any further
question. :0)

Best Regards,
Wei-Dong XU (WD)
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jason

Thanks for your help. I am sad that the open document is not
implemented...Would have put the icing on the cake for my add-in...

Thanks anyway,
Jason
 
W

Wei-Dong XU [MSFT]

You are very welcome! :0)

Best Regards,
Wei-Dong XU (WD)
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top