Highlighted

Problem with formatting text VBA scripting - VBA Excel to InDesign.

Community Beginner ,
Apr 18, 2020

Copy link to clipboard

Copied

Hi, 

I have a problem in VBA excel I taken data by :

AdobeInDesignApp.Documents.Item(1).TextFrames.Item(i).contents

 

here is a screen from In Design, 

I changed the price ( if it is the same lenght 3digits it is ok, if is longer, we have problem

with formatting

smolar22_0-1587237899165.png

After run script: 

VBA Excel:  AdobeInDesignApp.Documents.Item(1).TextFrames.Item(i).contents = Replace(AdobeInDesignApp.Documents.Item(1).TextFrames.Item(i).contents, "000", "19999")

smolar22_1-1587238116928.png

so it changed bold text and giving me a problem. I want to keep as above. 

Can you help me how to do that? 

Topics

Scripting

Views

84

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Problem with formatting text VBA scripting - VBA Excel to InDesign.

Community Beginner ,
Apr 18, 2020

Copy link to clipboard

Copied

Hi, 

I have a problem in VBA excel I taken data by :

AdobeInDesignApp.Documents.Item(1).TextFrames.Item(i).contents

 

here is a screen from In Design, 

I changed the price ( if it is the same lenght 3digits it is ok, if is longer, we have problem

with formatting

smolar22_0-1587237899165.png

After run script: 

VBA Excel:  AdobeInDesignApp.Documents.Item(1).TextFrames.Item(i).contents = Replace(AdobeInDesignApp.Documents.Item(1).TextFrames.Item(i).contents, "000", "19999")

smolar22_1-1587238116928.png

so it changed bold text and giving me a problem. I want to keep as above. 

Can you help me how to do that? 

Topics

Scripting

Views

85

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Have something to add?

Join the conversation