Good morning.
I am converting an application, previously written in VB6/Publisher2003, in
C#/Publisher2007.
The original app open Publisher, merge fields from db and save it as a
picture, filled with the correct values.
Now, I have to use Publisher2007 and C#;
the task was not very difficult (because Publisher2007 must be programmed
using COM object, and I simply translate every instruction from VB to C#).
All run fine, until the call to Page.SaveAsPicture...
With Publisher2007, the picture saved does not contains the merge value, but
the name of fields ( <<field_name>> ).
Well, the app open Publisher, merge the fields ( and I can see the correct
values )
but, debugging the app I see a very strange thing:
previous code row -> see field values
Page.SaveAsPicture -> see field names
next code row -> see field values
Seems like something change in the method, from 2003 to 2007...
Could someone help me, please?
Thanks in advance
Marco
Fred - 27 Aug 2007 15:48 GMT
> Could someone help me, please?
Apparently not. You may also come across an issue whereby page.saveaspicture
sporadically seems to get the page size completely incorrect.
Sadly, one of the many things Microsoft isn't very good at and seem to have
no interest in is fixing bugs or making genuinely useful improvements in
Publisher.
Best advice would be to use a proper dtp program like Adobe Indesign, which
is fully scriptable and mostly works properly.
MarcoNegri - 29 Aug 2007 13:06 GMT
Thanks for replay, i have solved.
For the community, i worked around this issue using
MailMerge.Execute method, that return a Document;
then, on this object, you can call the SaveAsPicture
that is correctly executed.
Thank to Ms for documenting this change...
> > Could someone help me, please?
>
[quoted text clipped - 5 lines]
> Best advice would be to use a proper dtp program like Adobe Indesign, which
> is fully scriptable and mostly works properly.