Macro Code Differences between applications

B

Bill Bowes

I use macros to extract file information from an .ini file and populate
fields in a Word document using the

system.privateprofilestring("data.ini","document","data") format.

This works fine in Word (up to 2003).

I do not seem able to do the same thing in PowerPoint or Excel as the
"system.privateprofilestring" does not seem to be recognised.

Is there any way round this?
ANY help would be gratefully appreciated.
 
J

Jonathan West

Bill Bowes said:
I use macros to extract file information from an .ini file and populate
fields in a Word document using the

system.privateprofilestring("data.ini","document","data") format.

This works fine in Word (up to 2003).

I do not seem able to do the same thing in PowerPoint or Excel as the
"system.privateprofilestring" does not seem to be recognised.

Is there any way round this?
ANY help would be gratefully appreciated.

Instead of the System.PrivateprofileString property (which I have found
occasionall causes errors for no apparent reason) go to
http://vb.mvps.org/samples/project.asp?id=kpIni and pick up Karl Peterson's
kpini class module, and use that. The same class can be dropped into a Word,
Excel or PowerPoint project.
 
Top