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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Publisher macros to extract info from other Publisher file 1

Status
Not open for further replies.

Grahamsp

Programmer
Jan 3, 2011
1
GB
Hi
I am trying to use a macro in MSPublisher 2010 to extract information from a table in another Publisher file on the hard drive. I can extract information from an ordinary text file but do not know how to get info from a shape inside a Publisher file. If it is necessary to run the file on the HD then thats fine. Any ideas.

Thanks in advance

Grahamsp
 
You probably will need to reference the Publisher object. I'd look there first. Sorry I can't specifically give you any code on it, as I've not used VBA for anything in Publisher.

Here are a couple references I grabbed that hopefully will provide some assistance to finding your answer:


Though I've seen a couple questions on Publisher VBA of late, and it's got me curious, thinking about it. Maybe one day I'll take a look at it myself, but I don't have a specific need, so it's not as likely. [smile]

The way Office VBA works is there are are objects and properties of said objects.

So in a Publisher doc with a table, you'd probably have a Publisher Doc/Sheet object, and then you'd have a Table object within said Doc/Sheet object. Then within that table, you'll have rows/columns/records/fields.

And now after some more digging, I think I may have found what you need:

This talks about using the Stories object in Publisher to access all info within a Publisher file. Give that a shot!

Report back with your progress.
 
Oh by the way, being that Publisher is not MS Access, this question would have best been posted in forum707 being as that's the more general forum for using VBA in Office programs other than Access.

Just as a hint: I don't think very much use of VBA is made in Publisher when compared to other Office products. Therefore you'll have a harder time finding help for it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top