Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Publisher / Programming / September 2007

Tip: Looking for answers? Try searching our database.

Formatting using macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mohan - 03 Sep 2007 13:12 GMT
Hi,
I am using macro to populate data in the publisher. I want to do formatting
of this data, say making Bold and using bullets. How can I do this? Is it
possible or not?

Thanks
Mohan
Ed Bennett - 03 Sep 2007 13:48 GMT
> I am using macro to populate data in the publisher. I want to do formatting
> of this data, say making Bold and using bullets. How can I do this? Is it
> possible or not?

I'm presuming you're using one of the TextRange.Insert() methods to
insert the text. (e.g. InsertAfter)

This method returns a text range, to which you can then apply formatting.

E.g.

    Dim aTextRange As TextRange
    Set aTextRange = _
ThisDocument.Pages(1).Shapes(1).TextFrame.TextRange.InsertAfter _
("Look, some blue text!!")
    aTextRange.Font.Color.RGB = RGB(0, 0, 255)

or

ThisDocument.Pages(1).Shapes(1).TextFrame.TextRange.InsertAfter _
("Look, some blue text!!").Font.Color.RGB = RGB(0, 0, 255)

Signature

Ed Bennett - MVP Microsoft Publisher
http://ed.mvps.org

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.