Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with macro

Status
Not open for further replies.

redwolfe

MIS
Jan 12, 2000
89
0
0
US
I'm working in PowerPoint and I want a macro to select the Insert option from the menu. The macro then opens the "Insert Symbol" dialog box and allows me to select the symbol that I want at run-time. I'm having trouble getting this to work so far. Can someone offer a coding example for accomplishing this?
 
Redwolfe,

To insert a symbol into a powerpoint textbox:

MyTxtBox.InsertSymbol FontName:="Symbol", CharNumber:=226

this inserts Character 226 from the Symbol font set to a textbox called MyTxtbox.

To run this when opening the file put the code in a sub called AutoOpen. To do this insert a new Module by right clicking on the project explorer, here is some more code:

Sub AutoOpen()
MyTxtBox.InsertSymbol FontName:="Symbol", CharNumber:=226
End Sub

What this does is every time you open your powerpoint document it will insert Character 226. Unfortunately, I don't know how to open the symbol dialog. You could create one yourself - this may be a little time consuming.

You could open a form where you enter the font name and the character number when you open the document.

I don't know if this helped at all. This is the limit of my knowledge with symbols and I'm not very familiar with powerpoint macros.

Cheers,
NoChoice
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top