Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Populating Document property values using macro

Hello everyone,

I have a question which has been giving me quite a bit of trouble this
morning. First off I need to populate the "metadata" (document properties)
for several workbooks and decided that a macro would be the best approach
considering we already have one for editing and formating data from other
workbooks into a new one(this is the one that needs the "metadata"). My code
is as follows:

Sub T00()
' StatSumm Macro

ChDir "file path"

Workbooks.Open Filename:="file path", UpdateLinks:=0

Range("A1:J65").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

Range("K:M").Delete

Range("A1").Select
ActiveWorkbook.Title = "Blah"
ActiveWorkbook.(insert others as needed) = "blah blah blah"
ActiveWorkbook.SaveAs Filename:="file path", FileFormat:=xlNormal

ActiveWorkbook.PublishObjects.Add(xlSourcePrintAre a, _
"\\S90x02\res\BULLETIN\FY06\Bull0605\Web\t00.h tm", "summary", "", _
xlHtmlStatic, "t00", "").Publish (True)

Workbooks("t00.xls").Close SaveChanges:=False


End Sub

The problem I have is that my method for populating those values doesn't
work for Company or Category can some one please help?

Mike DeWinter



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Populating Document property values using macro

only two or three can be set with that approach. For the others you need:

http://www.cpearson.com/excel/docprop.htm

--
Regards,
Tom Ogilvy


"Mike DeWinter" <Mike wrote in message
...
Hello everyone,

I have a question which has been giving me quite a bit of trouble this
morning. First off I need to populate the "metadata" (document
properties)
for several workbooks and decided that a macro would be the best approach
considering we already have one for editing and formating data from other
workbooks into a new one(this is the one that needs the "metadata"). My
code
is as follows:

Sub T00()
' StatSumm Macro

ChDir "file path"

Workbooks.Open Filename:="file path", UpdateLinks:=0

Range("A1:J65").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False

Range("K:M").Delete

Range("A1").Select
ActiveWorkbook.Title = "Blah"
ActiveWorkbook.(insert others as needed) = "blah blah blah"
ActiveWorkbook.SaveAs Filename:="file path", FileFormat:=xlNormal

ActiveWorkbook.PublishObjects.Add(xlSourcePrintAre a, _
"\\S90x02\res\BULLETIN\FY06\Bull0605\Web\t00.h tm", "summary", "", _
xlHtmlStatic, "t00", "").Publish (True)

Workbooks("t00.xls").Close SaveChanges:=False


End Sub

The problem I have is that my method for populating those values doesn't
work for Company or Category can some one please help?

Mike DeWinter





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Intellectual Property of an excel document Bart Excel Discussion (Misc queries) 2 April 8th 09 09:53 AM
Including document property values in Excel headers d_m_y Excel Discussion (Misc queries) 2 September 26th 08 10:44 PM
Populating word document from userform inputs. David Goodall Excel Programming 1 December 29th 03 11:25 PM
Stop open file through Document Property Sergio Luis Martins Excel Programming 2 December 25th 03 10:16 PM
ReadOnly property of word document not returning proper value. Jeremy Gollehon[_2_] Excel Programming 1 September 5th 03 07:25 PM


All times are GMT +1. The time now is 04:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"