Frontpage automation

S

Steve Bugden

Hi,

I would like start up Frontpage from a vb.net application, giving it
sufficient information to open a web page on a server.

I believe the folowing code will open a web:
dim oFP As New FrontPage.Application
oFP.Webs.Open("ftp://some/address/somewhere", "username", "password",
FpWebOpenFlags.fpOpenInWindow)

But how do I open a page and get frontpage to display on the screen?

Or does anyone know of a good tutorial?

Thanks in anticipation.

Best Regards,

Steve
 
S

Steve Easton

1. Make sure you call the System.Diagnostics namespace using: Imports System.Diagnostics

Then you create a new process and then use the process to open FrontPage and a page by
using a link

Dim openfp as New Process
Dim site as String = "http://www.websitename.com/index.html"
openfp.Start(frontpg.exe, site)

The password issue can be resolved also, but I'm not at my "developer" machine at the
moment.
However, the above should get you started.

iirc, you might want to check help for: IsolatedStorage
I "think" that section covers the password issue.


Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
S

Steve Easton

Correction.
Imports System.Diagnostics is a "reference" not a namespace
The namespace is your application or the form within the application.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
S

Stefan B Rusynko

You will not be able to open a ftp location
- only a FP web w/ FP SE in http mode

See
http://msdn.microsoft.com/library/d...dc_fpAutomatingRepetitiveTasks.asp?frame=true

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
_____________________________________________


| Hi,
|
| I would like start up Frontpage from a vb.net application, giving it
| sufficient information to open a web page on a server.
|
| I believe the folowing code will open a web:
| dim oFP As New FrontPage.Application
| oFP.Webs.Open("ftp://some/address/somewhere", "username", "password",
| FpWebOpenFlags.fpOpenInWindow)
|
| But how do I open a page and get frontpage to display on the screen?
|
| Or does anyone know of a good tutorial?
|
| Thanks in anticipation.
|
| Best Regards,
|
| Steve
|
|
 
S

Steve Bugden

Hi Steve,

Thanks for the reply.

I was hoping to use the Frontpage Object model, that way I am assuming that
the password can be included in the call.

Been using the start process method which works fine, but can't see how to
enter the password and I have to enter it everytime.

Steve.
 
S

Steve Easton

When you said vb.net, I was thinking Visual Studio.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
S

Steve Bugden

Hi Stefan,

I have been able to open a web page maually via ftp with Frontpage.

Are you sure this doesn't work when automating? Couldn't see anything to the
contrary in the link.

Steve
 
S

Steve Bugden

Yes that's right I'm using vb.net with vs.net.

I referenced the Frontpage object I just don;t know how to use it.

Steve.
 
S

Steve Easton

I don't think you need to reference the FrontPage object at all.

I believe you need to look at IsolatedStorage. That's what deals with files on a remote
machine.
( that might not be the exact term )
You might also try searching for System.Directory or System.DirectoryInfo

If I was home, I could tell you exactly what to look for.

I don't "think" you're going to be able to pass the username and password as part of a
http link, it's going to need to be done as a separate process.

In theory, if the domain is added as a trusted place in IE, you shouldn't be prompted for
a user and pass.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
S

Steve Bugden

I'm not sure how isolated storage could be involved here, it's just an are
that the .net framework provides for the storage of files.

Looking at some of the code samples, it seems difficult to believe that one
can't open a page using automation.

Maybe I shoudl be looking at Frontpage VBA, I could then adapt it to vb.net.

Steve
 
S

Steve Easton

The more I think about it, if you check "remember this user name and password," the system
won't be prompted for it anymore.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
S

Steve Bugden

That worked when I used http in combination with front page server extensions.

But now that I am using ftp with the following code:
Dim strPath As String = "C:\Program Files\Microsoft
Office\Office11\FRONTPG.EXE"
System.Diagnostics.Process.Start(strPath, "ftp://filelocation and name goes
here")

I get a prompt everytime for the username and password, but there is no
option to check.

That's why I would like to move to automation so that I have more control
over it.

Steve.
 
S

Steve Bugden

I forgot to mention that there is a text message in the username/password
dialog.

It says "This operation requires end user permissioning". The first time I
edited the page there was another dialog which had the checkbox I only had to
complete that once.

I assume the difference is that I am using ftp.

But it is still annoying as I have to enter the information everytime.

Steve
 
S

Steve Easton

Try this:
Open IE and then open ftp://websitename.com

You "should" see a dialog saying that anonymous login is not allowed.
Click OK
Click File > and select Login As and then enter the username and password.
Check the block "Save Password." and let the site open.
Then close the browser and run your vb app and see if you're still prompted for the
password


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
S

Steve Bugden

Hi Steve,

Thanks again for the replies.

I have tried your suggestion but the file I am trying to edit isn't at the
root.

THe url is equivalent of: www.somename.com

The ftp address I use to edit a page is something like this:
ftp://somename.com/SomeDirName/Pages/616/EN/1/123.htm

When I try this in IE I just get file not found.

I won;t be able to reply as from tomorrow as I am on holiday for 6 days. But
I will be very intersted to continue on my return.

Regards,

Steve
 
S

Stefan B Rusynko

You need to be able to not only open a web but open a page for editing in the web under the FP object model, which you can only do
in http mode




| Hi Stefan,
|
| I have been able to open a web page maually via ftp with Frontpage.
|
| Are you sure this doesn't work when automating? Couldn't see anything to the
| contrary in the link.
|
| Steve
|
| "Stefan B Rusynko" wrote:
|
| > You will not be able to open a ftp location
| > - only a FP web w/ FP SE in http mode
| >
| > See
| >
http://msdn.microsoft.com/library/d...dc_fpAutomatingRepetitiveTasks.asp?frame=true
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | Hi,
| > |
| > | I would like start up Frontpage from a vb.net application, giving it
| > | sufficient information to open a web page on a server.
| > |
| > | I believe the folowing code will open a web:
| > | dim oFP As New FrontPage.Application
| > | oFP.Webs.Open("ftp://some/address/somewhere", "username", "password",
| > | FpWebOpenFlags.fpOpenInWindow)
| > |
| > | But how do I open a page and get frontpage to display on the screen?
| > |
| > | Or does anyone know of a good tutorial?
| > |
| > | Thanks in anticipation.
| > |
| > | Best Regards,
| > |
| > | Steve
| > |
| > |
| >
| >
| >
 

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