HTML CODE FRAGMENT

C

Chanda

I'm trying to put together my personal website using Publisher. I want to
add an html code fragment. I go to web preview, then go to source, but when
notepad opens I don't get "insert" on the menu. I'm positive that I am in
web mode. Please help out an amateur! Thanks - C
 
D

DavidF

Chanda, You insert an HTML code fragment directly into your Pub file. From
Help in Pub 2000:

On the Insert menu, click HTML Code Fragment.

Click the place on your Web page where you want the HTML code fragment to
appear.
-Or-
Position the mouse pointer where you want a corner of the HTML code fragment
frame to appear, click, and then drag the mouse diagonally.
The HTML Code Fragment Properties dialog box appears.

In the HTML Code Fragment box, insert your HTML code fragment by typing or
pasting from another source over the entire placeholder text.

Click OK.
Your code fragment appears as code in the frame on your Web page, and the
result of your code fragment appears when you preview or publish your Web
page.

DavidF
 
D

DavidF

David, FWIW I suspect that Chanda was confused by the article within the
Office Online section:

Add an HTML code fragment to a Web page


The following is confusing:

"...Note: To view the HTML source code for a Publisher Web publication,
click Web Page Preview on the File menu, and then click Source on the View
menu.

On the Insert menu, click HTML Code Fragment.

Note: You must be in Web mode to view certain options specific to Web
publications. You can determine whether you're in Web mode by looking at the
title bar (title bar: A horizontal bar at the top of a window, dialog box,
or toolbar that shows the name of the document, program, or toolbar.) of
your open publication, which will display Web Publication if you're in Web
mode.

In the HTML Code Fragment box, insert your HTML code fragment by typing or
pasting from another source over the entire placeholder text.
Click OK. "

By having the first note preceding the directions of how to insert HTML code
fragments it seems to say that you do it directly from the Web page preview
into the HTML source code. Like I said, FWIW ;-)

DavidF

David Bartosik said:
While David corrected you quite well I just wanted to point out to you that
web preview is literally just that - a preview. There is nothing functional
about it.

David Bartosik - [MSFT MVP]
www.publishermvps.com
www.davidbartosik.com


Chanda said:
I'm trying to put together my personal website using Publisher. I want to
add an html code fragment. I go to web preview, then go to source, but when
notepad opens I don't get "insert" on the menu. I'm positive that I am in
web mode. Please help out an amateur! Thanks - C
 
D

David Bartosik [MSFT MVP]

Thanx for pointing that out. I'm requesting a modification asap.

David Bartosik - [MSFT MVP]
www.publishermvps.com
www.davidbartosik.com

DavidF said:
David, FWIW I suspect that Chanda was confused by the article within the
Office Online section:

Add an HTML code fragment to a Web page


The following is confusing:

"...Note: To view the HTML source code for a Publisher Web publication,
click Web Page Preview on the File menu, and then click Source on the View
menu.

On the Insert menu, click HTML Code Fragment.

Note: You must be in Web mode to view certain options specific to Web
publications. You can determine whether you're in Web mode by looking at
the
title bar (title bar: A horizontal bar at the top of a window, dialog box,
or toolbar that shows the name of the document, program, or toolbar.) of
your open publication, which will display Web Publication if you're in Web
mode.

In the HTML Code Fragment box, insert your HTML code fragment by typing or
pasting from another source over the entire placeholder text.
Click OK. "

By having the first note preceding the directions of how to insert HTML
code
fragments it seems to say that you do it directly from the Web page
preview
into the HTML source code. Like I said, FWIW ;-)

DavidF

message
While David corrected you quite well I just wanted to point out to you that
web preview is literally just that - a preview. There is nothing functional
about it.

David Bartosik - [MSFT MVP]
www.publishermvps.com
www.davidbartosik.com


Chanda said:
I'm trying to put together my personal website using Publisher. I want to
add an html code fragment. I go to web preview, then go to source, but when
notepad opens I don't get "insert" on the menu. I'm positive that I am in
web mode. Please help out an amateur! Thanks - C
 
H

html confusion

I'm also attempting to insert an html fragment in tomy 2002 pub web page to
create a description and keyword meta tag. I am having trouble understanding
how to edit the existing source html code for the web page that I see when I
view source in preview mode. Is this accomplished in the web page design
mode? If so how do I do this? and how do I save the changes? I am trying to
insert the meta tags so that I can submit to search engines, but as you can
tell, I'm having no luck in doing so.
Thanks for any help you can offer.

DavidF said:
Good job! Leaves me wondering if Chanda ever came back to the newsgroup.

DavidF

David Bartosik said:
 
D

DavidF

If your goal is to insert keywords and such, this was done under Web
Properties in version 2000...not by inserting HTML fragments or modifying
the code. From this article by David Bartosik:

http://www.publishermvps.com/Default.aspx?tabid=42

which describes the changes made in 2002: "One of the first changes you will
discover in 2002 is that the Web Properties dialog is gone. A similar dialog
is now located under the Tools menu, Options, Web Option button.".

If you truly want to edit the HTML code remember that this would have to be
done each time you modify the page before you upload the changes. That can
be done various ways, but one way is just go to the folder where you
published the code, find the index.html file, open it in IE, view source,
modify the code, and save the changes. Once again I would read the article
by David first as even the way Publisher 2002 code is written and saved was
changed from 2000, and was changed again if you installed the updates, use
sub-folders, etc.

Let us know if this answers your questions.

DavidF

html confusion said:
I'm also attempting to insert an html fragment in tomy 2002 pub web page to
create a description and keyword meta tag. I am having trouble understanding
how to edit the existing source html code for the web page that I see when I
view source in preview mode. Is this accomplished in the web page design
mode? If so how do I do this? and how do I save the changes? I am trying to
insert the meta tags so that I can submit to search engines, but as you can
tell, I'm having no luck in doing so.
Thanks for any help you can offer.

DavidF said:
Good job! Leaves me wondering if Chanda ever came back to the newsgroup.

DavidF

 
D

David Bartosik [MSFT MVP]

HTML code fragments are included in the html body. There is no way to
include them in the html head. All meta tags go into the html head. Thus you
cannot create your own meta tags. Publisher supports meta tags (desc,
keyword) thru the web options dialog (in 2002 under tools menu).
BUT...........
the meta tags dialog was broken in 2002.
It was patched in Service Pack 2.
You want to upgrade your Pub 2002 to SP3 level.
Visit our site for the link - http://www.publishermvps.com - to the SP3
download.

David Bartosik - [MSFT MVP]
www.publishermvps.com
www.davidbartosik.com

html confusion said:
I'm also attempting to insert an html fragment in tomy 2002 pub web page
to
create a description and keyword meta tag. I am having trouble
understanding
how to edit the existing source html code for the web page that I see when
I
view source in preview mode. Is this accomplished in the web page design
mode? If so how do I do this? and how do I save the changes? I am trying
to
insert the meta tags so that I can submit to search engines, but as you
can
tell, I'm having no luck in doing so.
Thanks for any help you can offer.

DavidF said:
Good job! Leaves me wondering if Chanda ever came back to the newsgroup.

DavidF

David Bartosik said:
 
H

html confusion

So what you are saying is that after upgrading to sp3 I should be able to
insert the meta tags into the head location where they belong and not
actually place a code fragment on the page so that search engines recognize
that they are even there?

David Bartosik said:
HTML code fragments are included in the html body. There is no way to
include them in the html head. All meta tags go into the html head. Thus you
cannot create your own meta tags. Publisher supports meta tags (desc,
keyword) thru the web options dialog (in 2002 under tools menu).
BUT...........
the meta tags dialog was broken in 2002.
It was patched in Service Pack 2.
You want to upgrade your Pub 2002 to SP3 level.
Visit our site for the link - http://www.publishermvps.com - to the SP3
download.

David Bartosik - [MSFT MVP]
www.publishermvps.com
www.davidbartosik.com

html confusion said:
I'm also attempting to insert an html fragment in tomy 2002 pub web page
to
create a description and keyword meta tag. I am having trouble
understanding
how to edit the existing source html code for the web page that I see when
I
view source in preview mode. Is this accomplished in the web page design
mode? If so how do I do this? and how do I save the changes? I am trying
to
insert the meta tags so that I can submit to search engines, but as you
can
tell, I'm having no luck in doing so.
Thanks for any help you can offer.

DavidF said:
Good job! Leaves me wondering if Chanda ever came back to the newsgroup.

DavidF

FYI, this article has been modified.
http://office.microsoft.com/en-us/assistance/HP030661311033.aspx

David Bartosik - [MSFT MVP]
www.publishermvps.com
www.davidbartosik.com
 
D

David Bartosik [MSFT MVP]

I'm saying after SP3 the values you input into the keyword and desc. dialog
box in web options will actually be coded into the html page.

David Bartosik - [MSFT MVP]
www.publishermvps.com
www.davidbartosik.com

html confusion said:
So what you are saying is that after upgrading to sp3 I should be able to
insert the meta tags into the head location where they belong and not
actually place a code fragment on the page so that search engines
recognize
that they are even there?

David Bartosik said:
HTML code fragments are included in the html body. There is no way to
include them in the html head. All meta tags go into the html head. Thus
you
cannot create your own meta tags. Publisher supports meta tags (desc,
keyword) thru the web options dialog (in 2002 under tools menu).
BUT...........
the meta tags dialog was broken in 2002.
It was patched in Service Pack 2.
You want to upgrade your Pub 2002 to SP3 level.
Visit our site for the link - http://www.publishermvps.com - to the SP3
download.

David Bartosik - [MSFT MVP]
www.publishermvps.com
www.davidbartosik.com

message
I'm also attempting to insert an html fragment in tomy 2002 pub web
page
to
create a description and keyword meta tag. I am having trouble
understanding
how to edit the existing source html code for the web page that I see
when
I
view source in preview mode. Is this accomplished in the web page
design
mode? If so how do I do this? and how do I save the changes? I am
trying
to
insert the meta tags so that I can submit to search engines, but as you
can
tell, I'm having no luck in doing so.
Thanks for any help you can offer.

:

Good job! Leaves me wondering if Chanda ever came back to the
newsgroup.

DavidF

message
FYI, this article has been modified.
http://office.microsoft.com/en-us/assistance/HP030661311033.aspx

David Bartosik - [MSFT MVP]
www.publishermvps.com
www.davidbartosik.com
 
R

rastababy

DavidF, Do you know how to code view in (HTML) publisher 2007? I'm also
trying to do a web site and trying to put paypal bottons in next to the
selling items. Know anything about that? Help would be much appreciated!
*curtsies
 
D

DavidF

I am not sure what you mean by "code view in (HTML) publisher 2007". If you
want to see the code then preview the site and in IE go to View > source
code. However, Publisher is not a code editor if that is what you are
talking about. Reference: Using Publisher for web sites:
http://msmvps.com/blogs/dbartosik/articles/80566.aspx
Perhaps Publisher is not the most appropriate program for you to use.

As per paypal, I believe they provide your with code snippets, and you use
the insert html code fragment tools to insert the code into your Pub page.

DavidF
 

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