View Single Post
 
Old 04-17-2014, 04:58 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

If all you are outputting is just the "File_Name", "Full_Path", "CreationTime" and "Size", I have to wonder why you're bothering with mergefields. After all, you're not using them for a mailmerge - all you're doing is using them as placeholders that you replace with your data. You could just as easily insert them as strings into an ordinary document with code like:

oWord.Characters.Last.InsertParagraphAfter;
oWord.Characters.Last.InsertAfter strFilename;
oWord.Characters.Last.InsertParagraphAfter;
oWord.Characters.Last.InsertAfter strFull_path;
oWord.Characters.Last.InsertParagraphAfter;
oWord.Characters.Last.InsertAfter strCreationTime;
oWord.Characters.Last.InsertParagraphAfter;
oWord.Characters.Last.InsertAfter strSize;
oWord.Characters.Last.InsertParagraphAfter;
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote