An easy one. A one-line (I hope) vba macro to "Preview in Browser"

J

JOCA

Folks,

I have several browsers installed in my machine so I can test my webpage for
compatibility. Every time I use the "Preview in Browser" choice under the
File menu, the next time I click on the "Preview in Browser" icon in my
toolbar, it will preview in the browser I selected when last used the
"Preview in Browser" choice using the File menu. In other words, when you
"Preview in Browser" using the File menu choice, you can choose the browser
in which you want to preview your page; while when you "Preview in Browser"
using the icon in your toolbar, you don't have a choice of browsers (it will
use the last one selected).

I would like to add custom icons to my toolbar to preview my page in
different browsers (one icon per browser). Does anybody knows what would be
the line in a vba macro that would produce the same result as the "Preview
in Browser" choice under the File menu in FrontPage 2002, specifying the
browser to be used?

Thanks to all who contribute to answer this question.

JOCA
 
M

MD WebsUnlimited.com

Hi JOCA,

That would not be a "one line macro" to accomplish this.

FP3 will provide a drop button that will allow you to choose the browser.
 
J

JOCA

Dear Mike,

Thanks for the tip about the toolbar icon that allows you to choose the
browser.

Still, out of curiosity, wouldn't there be a line of code on the lines of :

ActiveDocument.PreviewInBrowser(1)

(I know the line above does not exist. It just represents an abstract idea.
Treat it as pseudocode)

or something like that?

Thanks

JOCA
 
M

MD WebsUnlimited.com

No, because the command File | Preview In Browser opens a dialog box that is
not under the control of the object model.

The best you could do is open the dialog box.
 

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